3 ms·
People coming from most other languages don't realize that atoms ("symbols", in Lisp) can be used for many things that would otherwise be done with strings. Thi
by silentbicycle 16y ago
People coming from most other languages don't realize that atoms ("symbols", in Lisp) can be used for many things that would otherwise be done with strings. This really helps - pattern-matching on atoms is niiiice. Like much of Erlang, it makes lots of sense to people with Prolog experience, but ... who has Prolog experience? (lone hand) Oh.
Many of the performance issues (++, etc.) apply to any language with immutable strings, or any other immutable data structures. Clojure, Haskell, etc., but nobody harasses Clojure about being "bad for strings" - There's just a FUD meme about Erlang going around.
You can also do string handling via a port (an external program in C, or any other language), if it's a major performance issue - Erlang is happy to pass messages to an external program in any language. Lua has a similar design* . It focuses on doing certain things really well, and for the rest, there's an easy escape; no harm, no foul. "You want to run some eeevil code? Just run it in another process, we'll send data to it and handle the results if ze sleazy bastard doesn't crash..."
* And immutable strings - In Lua, all strings are atoms by default.