3 ms·
I keep hearing things about Phoenix (specifically LiveView) and I am very interested in Elixir. Whats the learning curve look like for someone who's primarily a
by lprd 8y ago
I keep hearing things about Phoenix (specifically LiveView) and I am very interested in Elixir. Whats the learning curve look like for someone who's primarily a Javascript (with a little bit of PHP/Laravel) developer? Is it a purely functional language?
- 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.
- hdra 8y agoI came from a Python and PHP/Laravel background, and personally, I find them to be pretty easy to learn. Having my "taste" in programming to be mainly influenced by Python, I find the "explicit is better than implicit" sensibility of the ecosystem to be agreeable. I'd suggest not to pay too much attention to the "functional" label of the language and not let it intimidate/distract you, and approach it as just learning another language. The usual functional programming concepts like monads, currying, partial application, etc aren't very apparent as they usually are in languages like Haskell, i.e. you can use the language productively without knowing any of these concept.