[erlang-questions] Erlang basic doubts about String, message passing and context switching overhead

Steve Davis steven.charles.davis@REDACTED
Fri Jan 13 23:26:02 CET 2017


> On Jan 12, 2017, at 1:56 PM, Jesper Louis Andersen <jesper.louis.andersen@REDACTED> wrote:
> Is Erlang bad at string processing?

Yes. Every language is bad at "string processing”. 

IMHO a better question is: Is Erlang bad at text processing? 

No. You just need to realize that there’s *no such thing* as a string in erlang, and keep ill-specified text binaries as binaries. Then you can use the magic of (cautious and limited) regex for tokenization and binary syntax (which is ***truly wonderful***) for parsing.

So do I have problems with text in Erlang? No, it’s far better for that than any other language I’ve used (and I’ve used quite a few).

Strings suck as a way to think about text. That’s the sum of it.

My 2c on all this.

:-)




More information about the erlang-questions mailing list