15 points · by oscardelben · 17y ago · 11 comments
module Fibonacci
def simple(0)
0
end
def simple(1)
1
end
def simple(n)
simple(n - 1) + simple(n - 2)
end
end
Ruby style syntax for this example seems too verbose when you consider the succinctness of: fib(0) -> 0;
fib(1) -> 1;
fib(N) when N > 0 -> fib(N-1) + fib(N-2) .At least that was stated in their goals somewhere, and admittedly my Erlang-fu is fairly weak, so I could be missing something awesome in that area.
The one thing that worries me is how much Erlang will still be required. Reia is turning out to have a very Ruby-like syntax, so it should be easy to pick up, but having to learn Erlang as well would give me second thoughts.
It's going to be a while before Reia can completely abstract the OTP platform so if you want to work with it any time soon, learn Erlang.