[erlang-questions] strings, json, and what happens now
Tue Sep 25 13:54:43 CEST 2007
I think it very much depends on what you are going to do with the string. If
you are going to store for later then using a binary with some encoding
(UTF-8, UTF-16, ...) is probably the best. But if you are are going to
*work* with it then keeping it as a list of codepoints is much better, much
better in fact than keeping them in arrays like C++ type strings.
How to handle the metadata I don't know. If I remember correctly from a
previous discussion the metadata was not really standardised and could be a
On 24/09/2007, Paul Phillips <paulp@REDACTED> wrote:
> When I read something like this:
> It says to me that some decision has to be made about improving string
> representations in erlang, or there are going to be several incompatible
> implementations in the wild soon.
> Are there good arguments against standardizing on an enhanced string
> "type" of a tuple including the list of characters and whatever metadata
> people are accustomed to having in other languages? I know this could be
> done without core language support if you were willing to wrap and
> unwrap it everytime you interacted with stdlib, or via a brand new
> string library which operates on the tuples, which seems more likely.
> But there's already so much important code spread out among third party
> libraries, it seems a shame to add to it, especially given the
> immaturity of erlang's library mechanisms when compared to gem, cpan, etc.
> I'm not particularly fascinated by character encodings and language
> impedance mismatches, and I would suppose neither are most people, but
> as someone presently trying to apply erlang in a real world setting this
> issue is demanding a large percentage of my initial time investment. Do
> those who speak for the distribution see the string representation as a
> problem? And is there some agreement on a way to deal with it?
> Paul Phillips | It's better to have gloved and tossed than never to
> Analgesic | have played baseball.
> Empiricist |
> all hip pupils! |----------* http://www.improving.org/paulp/*----------
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions