String and char type -------------------- char = 1..255 i.e. with space for none (=0) in an optional type This is not necessarilly a whole character. The "real" characater type is uint32. string = char#[nullterm] This also makes it possible to compare strings with character literals safely: s#[0] == "a" // ok because both are arrays of the same size s#[0..+1] == "å" // ok because both are arrays of the same size t = "A" t#[0..+2] // what should this do? fill with zeros? Empty string ------------ Some compilers (e.g. FreePascal) implement empty strings as null pointers. This is probably a quite good optimization, since empty strings are common, and are also often compared with other strings. But it requires that the string type is a pointer and is not compatible with C. A compromise could be to have two string types, one "C-style" null terminated array (which you usually pass by reference), and one "FreePascal-style" pointer. Strings in FreePascal use reference counting, which helps reducing copying and keeps memory usage down, but could cause problems with multi-threaded code which would not be expected by the programmer since the sharing happens behind the scene. AFAIK a String type looks like this: Index Data ----- ---- -8 Reference count -4 Length 0... String data