Sam Ruby gushes...
With many frameworks and languages, I get the feeling that I’m dealing with a metal cabinet covered by layers of marine paint; one where scratches tend to reveal sharp edges. With Erlang, I get the feeling of a Victorian mahogany armoire; one where scratches in the wood simply reveal more rich wood.Reading erlang can be fun. Here's Sam's atom2json.erl.
When combining this kind of concurrency with an imperative language, there's typically a bit of code explosion implementing loops and iterators. The tendency also is to write long stretches of code that update variables and structures in place, even when concurrency and first class functions exist.
Erlang, being a Lisp-like language (really), instead traverses lists recursively.
Erlang, being influence by Prolog (somewhat), combines recursion with (a simpler form of) pattern matching.
List recursion, pattern matching, and simple concurrency mechanisms interact into a code implosion. Not weird at all to this Lisp programmer.
No comments:
Post a Comment