[fpc-devel] Unicode and UTF8String
Michael Schnell
mschnell at lumino.de
Tue Dec 2 13:15:29 CET 2008
> avoids automatic
> conversion between types as much as possible.
>
I feel that it's a goody of a strongly typed language that automatic
type conversions can be done by creating the appropriate code statically
instead of having this embedded in the objects as with variants.
If doing a simple assignment "a := b;" types are either converted
appropriately or a compiler error is generated.
All integer and real types are converted automatically. If you try to do
"myInteger := myString;" you get a compiler error. But if you do
"myANSIString := myUTF8String;" the compiler generates an assignment
without a conversion, even though the types are provided by the system
(not by the user) and named according to the possible internal coding.
(We don't need to discuss why this is like that, the discussion is about
if it should stay this way.)
-Michael
More information about the fpc-devel
mailing list