

Erlang vs. Scala - prakash
http://yarivsblog.com/articles/2008/05/18/erlang-vs-scala/

======
systems
" Erlang doesn’t have loops — it uses recursion for _everything_ "

Doesn't this make the language a bit of a brain tease! What harm can a For
Loop do?

The best argument I heard against static typing, that for many tasks the type
system forces you to write solutions that cater for the type system and forces
you to create boilerplate code.

Isn't this "no loop" statement thing kind of the same, you have to
reforumulate your solutions to cater for and use tail recusion, similarly to
how you might have to reformulate your solutions to support a type system
constraints

I prefer how OCaml allows you to program in different paradigms, in general
thought OCaml does enforce many constraints, but its hybrid nature is a step
in the right direction

I also like how Groovy (and Perl6) support optional typing.

~~~
hassy
`map` covers the majority of what for-loops are used in imperative languages.
There's also `foreach`, which is a `map` that doesn't give you a new list
back. You've also got list comprehensions if you prefer them over `map`.

Then there are also `filter`, `all`, `any` and others.

The rest of your iteration needs can be covered by the `fold` functions.

Sure, these functions use tail-recursion internally, but you never have to
care about that.

------
scott_s
Interesting and enjoyable comparison, but it sounds like the author was
looking for reasons to justify his love of Erlang over the alternative. It's
more "Why I will continue to use Erlang over Scala" than "Differences between
Erlang and Scala."

------
davidw
Very nice article. It answered some of the things I've wanted to know about
Scala (scheduling and actors), although of course I'd be curious to see if the
Scala guys have a 'rebuttal'.

~~~
michaelneale
I would think that it is comparing the one killer feature of erlang, with one
of 1000s in scala - and scala shapes up pretty well (plus its early days for
it, its not early days for erlang).

~~~
davidw
He lists more than one cool Erlang feature by my reading, and yes, Scala still
comes out pretty well. That's why I liked it: knowing Yariv, I expected him to
boost Erlang, but the piece was well done, and not at all unfair to Scala.

