5 ms·
Nice question, I'm just starting with Elixir for a side project. Has anyone else find it to have a steep learning curve? Coming from Java/Scala and Python, I fi
by salex89 5y ago
Nice question, I'm just starting with Elixir for a side project. Has anyone else find it to have a steep learning curve? Coming from Java/Scala and Python, I find it harder to wrap around then Scala was years ago. Shortcuts with mix like mix phx actually make it a bit more complicated for me because I'm used to understanding what is exactly happening under the hood.
- bluevlah 5y agoGetting hang of functional programming takes time. Writing code elixir way requires unlearning what you have learning from imperative languages.
- cerved 5y ago> Scala Scala isn't exactly an imperative language. If anything it's the actor model isn't exactly easy to wrap your head around
- bluevlah 5y ago> Java, Python I was talking more about Java/Python. Also Scala has inheritance and OOP. Which don’t exist in elixir has only map.Map + additional field is struct in elixir. Function capture, enumerations, pattern matching, implicit return and tuples returning status is what confuses new people. Most try to implement some kind of inheritance in elixir. Actor model is in OTP. Process, supervison, actor and messages are concepts of OTP. Elixir does not have actor in in its language constructs. There is no replacement/alternative for OTP if you want distributed systems. Many tried to reimplement Erlang in their languages and failed miserably.
- Jamustico 5y agoI've used ocaml in the past and I not new to functional programming, but the whole Phoenix framework is somewhat confusing.
- oldprogrammer2 5y agoMy biggest hurdle was being too impatient to learn how to code with immutable data. I banged my head on the desk for two days to get through what I felt was a trivial problem (something with updating files in S3), which I eventually rewrote in python in less than an hour. Immutability (and the resulting maintainability and predictability) is really appealing to me, though. When I try it again, I think I'll focus on educating myself around the language upfront and not just learning as I go. Everything else about the language, Phoenix, and the tooling was really nice. For the same reasons as others have said, I would not pick Elixir for a business, though.
- BeFlatXIII 5y agoTo answer your question, yes. My background is also primarily in Python (after brief flirtations with other languages during and shortly after college). When trying to learn Elixir (or Scheme, for that matter), my primary hurdle has been thinking in terms of idiomatic Elixir. The struggles aren’t with understanding the syntax (even for Scheme) but rather with understanding the typical patterns used such that I can start a project from scratch without heavy reliance on tutorial materials. In other phrasing, I’ve quickly mastered the “draw three thin ovals” portion but am now stuck at “draw the rest of the phoenix”. Speaking of Phoenix, I also agree about “mix phx.gen” to be more magical than what I’m used to.