Hello Lazarus-List, Monday, February 14, 2011, 7:03:31 PM, you wrote:
JH> Do you mean that the compiler should convert the strings as needed in JH> the background (as between different integer types and/or floats) so JH> that you can call ListBox1.Items.Add(x) with x beeing UTF8string or JH> UTF16string or...? I am not sure whether this is a good idea because the JH> programmer no longer knows how many conversions take place and therefore JH> cannot judge the performance impact anymore. On the other hand it would JH> make the life easier for beginners. I'm unable to see the "great" problems with "UnicodeString". The conversions should be the minimun needed, and they will be. Problem would be in the RTL, but not at user level. You say that the programmer will not know how many conversions take place, that's right, but I think they are garanteed to be the minimum except in some corner cases like "CompareText(UTF8String,WideString)" as one of both must be converted, but whichever one, could be a fixed situation or platform dependent, I do not know. Many people are concerned about "speed" due hidden conversions, so can anybody tell me why ? Maybe I'm blind and I can not see something that is absolutly a problem (except some pieces of RTL). -- Best regards, José -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus