[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: What do you miss most in Lua
- From: Matthew Wild <mwild1@...>
- Date: Wed, 8 Feb 2012 20:00:17 +0100
On 7 February 2012 07:26, Roberto Ierusalimschy <firstname.lastname@example.org> wrote:
>> The main question I suppose is: is the resulting user code, using
>> mostly ordinary string functions plus a little minimal utf8 tweaking,
>> going to be significantly uglier/harder-to-maintain/confusing, to the
>> point where using a heavier-weight abstraction might be worthwhile?
>> My suspicion is that for most apps, the answer is no...
> You are my idol :)
Indeed. For what it's worth, XMPP (based on a certain subset of XML)
uses only UTF-8 encoding. This means that nearly all strings in
Prosody are UTF-8 encoded. Yet we have no standard UTF-8 string
library/API, and I can count on the fingers of one hand the places
where we do UTF8-aware operations on strings, while we do make use (in
a UTF-8 safe way) of Lua's string library functions.
I understand entirely that some applications *will* need to do
operations on unicode strings all over the place. A text editor would
be a good example, for instance. Therefore such libraries absolutely
should be available. But my point is that even a fully unicode-capable
application often won't need them. Like everything else in Lua, I
think the application developer can safely make the decision.