[erlang-questions] A proposal for Unicode variable and atom names in Erlang.
Mon Oct 22 16:05:25 CEST 2012
As one can read out from the document linked below (and others like it),
to_upper and to_lower is not trivial, but can sure be done. We have no
concept of locale in Erlang, so I think the conversion logic will have
to be limited to non context-dependent (as described in the document
linked below), at least to begin with.
If anyone wants to extend the unicode module with such a feature, it
would be really nice and welcome. Or the string module, if you only want
to handle lists. Or both...
On 10/22/2012 09:21 AM, Yurii Rashkovskii wrote:
> Thanks — will look into this. We only spent one day on this so covered
> only a small territory to validate the approach.
> On Mon, Oct 22, 2012 at 12:19 AM, Michael Uvarov<> wrote:
>> It is yet another implementation without SpecialCasing.
>> Here is a right algorithm.
>> On Mon, Oct 22, 2012 at 11:10 AM, Yurii Rashkovskii<> wrote:
>>> Couldn't agree more. There are so many other more important issues that
>>> could have been addressed by the OTP team and contributors.
>>> By the way, we just go this (lower and upper) implemented in Elixir, but it
>>> could be very well separated out of Elixir to be used by plain Erlang
>>> developers: http://coderwall.com/p/pehkba
>>> It compiles the necessary part of the unicode database right into the beam
>>> file, making it fairly efficient. Also, pending merge, I have a patch that
>>> makes upcase and downcase work with graphemes as opposed to codepoints
>>> (https://github.com/elixir-lang/elixir/pull/566), which we hopefully will
>>> merge in shortly.
> erlang-questions mailing list
More information about the erlang-questions