Dyn text is immutable and counts characters, str counts bytes

This commit is contained in:
Joseph Ferano 2026-09-25 22:03:26 +07:00
parent 85283c2e87
commit 5adabd9f3c

View File

@ -16,7 +16,9 @@ Decided 2026-09-25: the typed read-only text is =str= (renamed from =string=); =
is new, owned, growable, always valid UTF-8, through an allocator. The prelude's text
builders return =String=; =(Vec u8)= stays for raw bytes. Text is UTF-8 everywhere and
a character is a code point; dyn gets a character tag, so \\I prints as \\I.
Waits on the dyn-unless-annotated design.
Dyn text stays immutable, with chars and text converting to and from a dyn
vector of characters; length and indexing count characters on dyn text and bytes on
str. Waits on the dyn-unless-annotated design.
** NEXT Any typed container crosses into dyn as a view
Decided 2026-09-25: every element type (all numbers, chars, structs, nested arrays)