google / mangle

Apache License 2.0
1.07k stars 38 forks source link

Support a /bytes data type and enforce that /string is utf8 #29

Closed burakemir closed 8 months ago

burakemir commented 8 months ago

Before we get serious usage on Mangle, it is important to tackle the issues of strings and encodings.

When strings are textual data, it is advantageous to have a known, fixed encoding (and that encoding is UTF8). For anything that is not UTF8 text, one can then use a dedicate byte sequence type.

This has some implications for literals, the output of String(), debug output and serialization, but all these issues already exist and have a /bytes type actually makes tackling these simpler.

burakemir commented 8 months ago

I messed up the issue reference, /bytes was added in Commit 7c7747d55e2c9a5b09801d5052feb8c6ef85dcf6