[fpc-devel] Unicode support (yet again)
Marco van de Voort
marcov at stack.nl
Mon Sep 19 11:13:09 CEST 2011
In our previous episode, Fl?vio Etrusco said:
> > IMHO you are seeking the problems in the tools, while the problem is PEBKAC
>
> I partly agree it's PEBKAC, but why make it easy to get wrong when you
> can avoid it?
The point is you can't. You only keep the illusion you can marginally longer
at a gigantic price.
> Isn't that the point of Pascal?
No. IMHO the point has always been to find a sweet spot. Delphi is not
Visual Basic. Delphi is native and fast.
> Isn't that the point of AnsiStrings? Isn't that the point of strong typed
> languages in general?
IMHO you are just dragging in random terms here. Variable encodings were not
forseen in the design, so one can't tell how to deal with it from history.
> > I don't like the Java/C# way that you have to manually allocate extra
> > objects (stringbuilders etc) to get(performant) access to the characters though.
>
> At least we are not tied by bytecode & VM, so I think we can make better ;-)
Not everything is black/white.
> Is it unthinkable to have the basic/native string type an object?
Probably not. C++ has it, but a rough idea is next to useless. The devil
(and the brilliance) is in the details and borderconditions. See e.g.
http://www.freepascal.org/faq.var#extensionselect
and then specially the second half on how to make a proposal.
More information about the fpc-devel
mailing list