richer formatting
This commit is contained in:
@@ -686,8 +686,8 @@
|
||||
evaluation; runtime-dependent values remain invalid in comptime contexts
|
||||
- runtime-only behavior is rejected in comptime: external/bodyless `c_func`,
|
||||
writable globals, and materializing comptime storage pointers/slices as runtime memory
|
||||
- v1 keeps integer-only `$N` specialization keys; aggregate comptime parameters
|
||||
and stable aggregate serialization are deferred
|
||||
- milestone 39 extends specialization keys from integer/type/string values to
|
||||
recursively stable values while keeping runtime ABI erasure unchanged
|
||||
|
||||
27.8 source-defined mutable runtime globals (implemented)
|
||||
- allow mutable global declarations in Brolang source for process-global runtime
|
||||
@@ -867,7 +867,23 @@
|
||||
38. place every intrinsic behind direct unqualified `name!(...)` syntax, freeing the bare names for
|
||||
user functions (implemented)
|
||||
|
||||
39. aggregate comptime parameters and richer formatting
|
||||
39. stable comptime values and richer formatting (implemented)
|
||||
- comptime parameters accept booleans, integers, floats, types, immutable bytes,
|
||||
enums, fixed arrays, records/tuples, optionals, and tagged unions recursively
|
||||
- canonical specialization keys include deterministic type identity, exact float bits,
|
||||
byte contents, ordered aggregate children, optional state, and active union variants;
|
||||
FNV-1a fingerprints accelerate lookup while exact key comparison handles collisions
|
||||
- equal structural values reuse specializations and stable emitted names, distinct values
|
||||
specialize separately, aggregate inference uses exact type-factory provenance, and all
|
||||
comptime parameters remain erased from the runtime ABI
|
||||
- undefined values, pointers, functions, general slices, fallibles, ranges, and untagged
|
||||
unions diagnose that they have no stable comptime identity
|
||||
- `@std/meta.TypeInfo.enum` carries declaration-ordered `EnumInfo.fields`, enabling enum
|
||||
formatting through `field!` without runtime reflection metadata
|
||||
- `io.print` and `debug.print` retain their APIs and expand `{}`, `{s}`, `{d}`, `{b}`,
|
||||
`{o}`, `{x}`, `{X}`, `{c}`, and `{e}` at comptime; `{{` and `}}` remain escapes
|
||||
- integer output uses one base-aware 65-byte stack buffer; float output uses fixed-buffer
|
||||
libc `snprintf` with 32-bit and 64-bit general/scientific precision and propagates failure
|
||||
|
||||
## A word on unchecked casts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user