Jürgen Hestermann schrieb:
But why are you using the generic "string" type at all? If you want to make sure that you use AnsiString or ShortString or whatever then use it directly. That way you have full control about the string type used.
The compiler should support string types as *really* different types, and should not try to convert (certain) string types automatically, or to reinterpret Ansi as UTF-8 or the like. Then there exist no problems with character codes, that do not exist in the codepage choosen by the developer.
I wouldn't care when a very new type, e.g. "text" or "Unicode", would be introduced for Unicode encodings, with slightly different rules (low-level support removed). This would allow to use strings *as* and *for what* these types have been introduced, strictly separated from other textual content and types.
I also wouldn't care when e.g. filenames would become a type of their own, with all *required* support for the various file systems and their conventions - because this is the *only* place where Unicode can not be ignored, in no application. This type could become a true class type, with polymorphic implementation of the target platform, networking and web conventions - e.g. tURL.
DoDi -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
