If I had to sum up the difference between Ruby and Erlang in a
sentence, it'd be this: Erlang makes programming harder, but
engineering easier, while Ruby makes programming easier, but
engineering harder.
It took me a long time to appreciate the difference between
programming and engineering. The distinction is somewhat artificial,
but I think of "programming" as those times you just want to produce
some output of interest, and engineering is when you start to worry
about performance and resource consumption.
With most languages, engineering websites is difficult. You have to
worry about templates being slow, databases taking a long time, the
garbage collector running, and all of the side-effects on the system
that these events have. As a result you have to think very carefully
about caching strategies, I/O strategies (async vs. sync), and
manually invoking the garbage collector.
Erlang makes all that stuff easy. Templates don't need to be cached,
I/O is always async, and the garbage collector runs on one process at
a time so you're not going to see weird system-wide performance
spikes. As a result you don't have to waste brain cycles thinking
about the usual engineering problems, and can focus on the user
interface and business logic.
With Ruby, novice programmers are led to believe that engineering Ruby
must be easy because programming Ruby is easy. But the reality is that
engineering a Ruby application is basically the same as engineering an
application written in any other language (apart from Erlang). You get
some nicer syntax along the way, and a lot of libraries, but you still
have to worry about threads and rendering time and stack sizes and all
that.
In a sense Erlang applications are practically engineered for you by
the guys at Ericsson. They made a large number of correct design
decisions that has resulted in a truly great platform to program for.
The trade-off with Erlang is that it's a functional language, which
requires more thinking to solve a particular logic problem, so
programming Erlang is harder than Ruby. (That and Erlang is slow at
crunching numbers.) But most of website development has nothing to do
with logic problems, let alone arithmetic, so you can get pretty far
with just sequential calls to APIs.
With CB I've tried to design a nice clean set of APIs that makes web
development in Erlang a lot of fun. You get the satisfaction of
knowing you're building an application on a rock-solid foundation, and
along the way you don't have to sweat over traditional engineering
problems. That's taken care of for you.
Evan