[Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0?

Lars noreply at z505.com
Fri Oct 21 11:51:23 CEST 2016


On Fri, October 21, 2016 1:03 am, Gabor Boros via Lazarus wrote:
> Hi All,
>
>
> In the past I used Length, Pos, Delete, for i:=1 to Length(s) do s[i]...
> and realized yesterday these practices are wrong. But I do not know what
> the right practice.

Indeed this is a serious problem these days, unicode.. which is almost a
virus. In GoLang they use something called "Runes" to try and solve the
problem.  Off topic but I wonder if Lazarus/fpc uses something anything
similar to golang's rune's approach or looked into it.

IMO unicode reaches something like Godel's incompleteness problem. You can
never actually prove that a unicode program will work properly nor prove
that it won't have bugs, because unicode creates infinite gotchyas and
unicode is always evolving to have more characters that you didn't know
about before.

It makes code inelegant compared to plain english 255 systems like in the
1970's.

There is an interesting article/video about it on Sucksless, and even this
guy scares me when he talks about unicode even though he is trying to fix
the problems:
"UTF-8 everywhere? Writing Unicode compliant software that sucks less,
Laslo Hunhold"

But it of course is not specific to Lazarus. Sorry for slightly off topic.


More information about the Lazarus mailing list