Alexander Klenin schrieb:

>>> Since string was introduced as built-in "scalar" type with defined equality,
>>> lack of 'case' support can be viewed as a design bug.
>> IMO strings are similarly "scalar" as are floating point numbers, with
>> regards to 'case'.
> 
> Note that I said "with defined equality". The reason 'case' should not include
> floating point numbers is that equality if not usefully defined for them.

The same for strings, where mere binary (case sensitive) equality often 
is useless.

Furthermore Pascal 'case' supports ranges, which deserve a stricter 
order than only equality. Then the sort order of strings also depends on 
the encoding (codepage, MBCS, UTF...).

And last not least strings IMO are complex types (array of char), as 
they have been in Wirth Pascal. The order of a comparison of ordinals is 
O(1), whereas string comparison is O(n).

DoDi

_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to