WhatsNew: Show + print milestone close
This commit is contained in:
@@ -106,3 +106,15 @@ The new dispatch model is now anchored in the language reference as a named subs
|
||||
Bench all-green; the noise envelope on a tail-latency metric continues for the sixth consecutive audit and remains baseline-pristine pending a clear signal-vs-variance call.
|
||||
|
||||
Queue back to user-direction: the prelude-rewire milestone is ready for a fresh design pass against the new dispatch model.
|
||||
|
||||
## 2026-05-13 — Show and print
|
||||
|
||||
AILang now ships `show` and `print` in the prelude. `show x` produces a Str representation for Int, Bool, Str, and Float (Float is included because textual representation is well-defined modulo libc's NaN spelling, whereas Eq/Ord deliberately exclude Float). `print x` is a polymorphic helper that formats x via show and writes to stdout — it works on any type Show has been declared for, including user-defined ones via `instance Show MyType`.
|
||||
|
||||
Calling print on a type without a Show instance is rejected at typecheck with a Show-aware diagnostic pointing at the prelude documentation.
|
||||
|
||||
The per-type `io/print_int`, `io/print_bool`, `io/print_float` operators stay for now; new code is expected to use `print`. A future milestone migrates the existing example corpus.
|
||||
|
||||
Bench continues on the same noise envelope observed across the last ten audits — baseline pristine.
|
||||
|
||||
Queue back to user-direction: the next roadmap item is that corpus migration, which retires the per-type print operators.
|
||||
|
||||
Reference in New Issue
Block a user