Syntax—also called the syntactic level—describes how text is written in source code and how the compiler parses it. Unicode escape sequences (”\u{00E9}”), string literals (”hello”), and string interpolation (”\(value)”) all belong to this layer. They are construction mechanisms: precise instructions telling the compiler to consult the Unicode table, translate code points into Unicode scalars, and assemble them into a string. This level is designed for correctness and determinism, not human intuition.
String semantics is a higher-level concept. Although the word semantics looks plural, it refers to a single domain: meaning. At the semantic level, a string represents human-perceived text rather than its construction details. Different syntactic forms can therefore map to the same semantic value. For example, “\u{00E9}” (precomposed é) and “\u{0065}\u{0301}” (an e plus a combining acute accent) are syntactically different, yet semantically equivalent. Humans read the same character; the string system’s job is to bridge low-level Unicode mechanics with high-level meaning.


