3 ms·
> Whats the learning curve look like for someone who's primarily a Javascript (with a little bit of PHP/Laravel) developer? Really depend how much of a languag
by anthony_doan 8y ago
> Whats the learning curve look like for someone who's primarily a Javascript (with a little bit of PHP/Laravel) developer?
Really depend how much of a language junkie you are.
I came from old school javascript and php and did mostly functional javascript (closure, high order function, etc...). I did other languages too but php & javascript was my primary. It's moderate not a very complex language but the paradigm can be a little bit high. The creator kept the language nice and small imo.
You can get away with half of it if you're just doing phoenix and ignore OTP (process, concurrecy stuff). You can learn OTP later.
> Is it a purely functional language?
Very close to pure.
There is no for loop. If you want to loop you have to do recursion.
You don't have to loop much because there are comprehensions and generators.
You don't use closure or anything that fancy unless you want to. I think the most is higher order function and those functional stuff like map, reduce, etc... It's not bad because you can google those things to get what you want. I think learning how to pipe |> a lot of stuff and pattern matching is what you really need mostly.
Reason I said very close is because it's pragmatic like Python where not everything is an object. You can invoke len() function without it being a method to an object. The example most Erlang tutorial will give being pragmatic is the time function how the time function isn't Referential transparency. Also so other fancy missing functional stuff from Haskell that some people asked for in elixir forum but I don't understand.