Primitive literals are typed by local inference, and container and text literals are dyn unless annotated
This commit is contained in:
parent
7c197e3bb0
commit
8e8015cb2d
15
TODO.org
15
TODO.org
@ -26,14 +26,13 @@ and any storage; a dev build checks a view against its frame or allocation and t
|
|||||||
when stale, a release build does not. Waits on the dyn-unless-annotated design.
|
when stale, a release build does not. Waits on the dyn-unless-annotated design.
|
||||||
|
|
||||||
** NEXT Dyn unless annotated
|
** NEXT Dyn unless annotated
|
||||||
Decided 2026-09-25: in both syntaxes an unannotated value is dyn — [6 2 4 9] is a dyn
|
Decided 2026-09-26, replacing the plain rule: number, bool and char literals are typed,
|
||||||
vector, 1 a dyn integer — and a typed value needs an annotation. Decided 2026-09-26:
|
their type inferred from their uses inside the function (never across functions); an
|
||||||
the plain rule — a literal is dyn wherever nothing wants a type, typed functions
|
unconstrained integer literal is int (i32) and a float literal float (f32); uses that
|
||||||
included; a value from a typed source keeps its type; for/dotimes counters stay i32; a
|
disagree are refused with a request for an annotation. Vector, map and text literals
|
||||||
warning marks a dyn let meeting typed code in a typed function. Migration in the
|
are dyn unless something typed wants them. A typed value is boxed where it goes into
|
||||||
design's order: str rename, views of any type, dyn-meets-typed fixes, literals built
|
dyn, and a dyn unboxed (checked) where typed code needs it; typed beside dyn in an
|
||||||
once, the switch with the warning, annotation script, flip, String.
|
operator gives dyn. Dyn integers stay i64 and dyn floats f64.
|
||||||
|
|
||||||
** DONE Dynamic-first, and the dyn half of the language
|
** DONE Dynamic-first, and the dyn half of the language
|
||||||
CLOSED: [2026-09-20]
|
CLOSED: [2026-09-20]
|
||||||
An unannotated parameter or return is =dyn=: a NaN-boxed value over a mark-sweep
|
An unannotated parameter or return is =dyn=: a NaN-boxed value over a mark-sweep
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user