[erlang-questions] Vector instructions
Richard A. O'Keefe
ok@REDACTED
Mon Apr 7 01:01:34 CEST 2008
On 7 Apr 2008, at 9:16 am, Zvi wrote:
> This is the same kind of mistakes, like 2 bad design decisions made in
> Erlang:
> 1. "Ohh, record looks just like a tuple!", so let's throw in some
> syntactic
> sugar for this, instead of real immutable structs/dictionaries.
> 2. "Ohh, string looks just like a list of integers!", so let's throw
> in some
> syntactic sugar for this, instead of implementing real Unicode-aware
> immutable string datatype.
I cannot let this past. It must be understood clearly that
for many purposes, Erlang's use of lists of integers for strings
is an EXCEPTIONALLY GOOD design.
The number of programming languages with a "real Unicode-aware immutable
string datatype" can be counted on the fingers of one ear. Unicode is
far more complicated than most people realise. The Unicode 5.0 book
(which I am currently slogging through) is >1400 pages. Admittedly,
much of that is code charts, but an astonishing amount of it is not.
I am not excepting Java from the list of "not real Unicode" languages.
Unicode has about a hundred thousand characters. Java characters are
16 bits. Need I say more?
One language that _doesn't_ have Java's central defect is Haskell,
where the native representation for a string is, ahem, a list of
character( code)s.
More information about the erlang-questions
mailing list