4 ms·
Erlang now has a full-featured standard regex module called re that handles utf8 strings and binaries. It now has a standard module for handling unicode. Yes,
by ellyagg 17y ago
Erlang now has a full-featured standard regex module called re that handles utf8 strings and binaries. It now has a standard module for handling unicode.
Yes, regexes aren't part of the language syntax, but then that's not true for, say, python, either. Having to use a library to do regex is not going to be the difference maker in productivity for your app.
Besides, while I love regex, I still use them as a last resort. You're going to want to use a real parser for reliable structured text processing.
Generally, erlang programmers keep strings in binaries, which are compact. Most modules for handling string type tasks allow you to do this, e.g., the re module understands a unicode_binary type.
In 6 months of programming erlang professionally, in a domain dominated by scripting languages like python and ruby, I've certainly never been tempted to bolt over string handling issues. Erlang's flexible distribution, concurrency, and reliability model is just too compelling.
To get competitive performance in a reasonable amount of programmer time for concurrent applications in other languages you're limited to the subset of tasks that, say, twisted or tornado makes easy. The program I'm writing now couldn't have been done with either of them.
Frankly, if it's the choice between built-in support for regex and built-in primitives for distribution, concurrency, and fault tolerance, there's no question in my mind which is more important.