Elixir as a language is really approachable. If you're looking to dive in I recommend the book `Elixir in Action` but the official docs are also quite good.
I honestly don’t see why a beginner couldn’t learn Elixir. You can start with if/else, and later learn how to do things more elegantly with pattern matching. You don’t have to use processes and GenServers right away (and even afterwards, you can use a library/framework which provides an abstraction). The ecosystem has many advanced features and use cases, but simple programs are not much harder to write than they are in Python or Ruby.
In some ways, getting programmers to start out thinking about “everything as an expression” and immutability-by-default might help them write elegant and robust code earlier in their journeys.
I've just recently gotten into elixir, and it really is the first time in a long time I've wanted to just "do things" just for the sake of doing them with a language.
What are you aiming to build? Without any additional detail I can say Elixir fits your criteria but may not be what you actually need! It's beginner friendly in my experience, cross-platform, and is a functional programming language which I'd put in the pros column for beginners.
Yeah, why not? My first language was JS but i use Elixir daily and it definitely made me a stronger dev. What hooked me into Elixir was seeing it for the first time and getting really excited by being able to read the code line by line without knowing the syntax and getting a good sense of what was happening.
But three things i think that really matters for someone to pick their first language are: 1. Is syntax and data types easy to grok right off the bat? 2. How fast are they able to make a mental map of the flow and transformations of data only by reading the code? 3. Are the docs easy to read and navigate, and do they instill understanding?
Elixir definitely is for someone that wants to learn it, and are okay with the fact there might not be many resources to learn from. But what i gathered so far is most of the resources and the community really seek to help someone get a deeper understanding of the language and think about the things that go beyond languages like system design and code quality. Yeah there isn't many packages and libraries out there like the more popular languages to put stuff together, but that's where the fun begins. It's like being in uncharted territory where one is forced to engage with what they're doing and learn how to really build stuff from scratch.
For someone thinking about elixir as a first language, hacking around a basic module and testing it out in the repl to building a web app with Phoenix is a great way to learn.
I've had Elixir on by backlog of languages to play around with for a while now. This weekend I actually got a chance to sit down and poke around for a while. It was really enjoyable, love the tight integration of pattern matching. The ecosystem surrounding the language also seems very nice: The REPL, the mix build tool, and the nice integration with unit testing, are all very attractive features of the platform.
I took the chance to write up my beginning experience playing with the language, trying my best not to look at the docs. You can find the write up here: http://bjg.io/learning-elixir/
There also seem to a bunch of existing resources for getting started:
How easy (or hard) is it to learn Elixir for someone with Python/PHP/JS background and zero knowledge of functional programming? Also, are there job opportunities for Elixir or is it a niche language?
Let me start by saying that I really like Elixir as a language and ecosystem. That said, I don’t think it’s a good choice for a first language.
Elixir excels for building highly available networked backend applications. Not that it can’t be good for other things, but I personally tried my hand at it as a scripting language (as a complete newcomer to programming might). For this purpose I had to learn things like Erlang interop, module composition, setting up a mix project, etc. — just to get a small project off the ground. Even as a seasoned developer familiar with syntactically and conceptually comparable languages (Ruby, OCaml…) I found the self-instructional overhead to be atypically high for a programming environment.
This is a bit of a tangent, but I’ve noticed that whenever “best first language” discussions come up, responses tend to be biased toward whichever language people first scrapped something together in for fun. For me that was TI-BASIC. By no means do I think that was a “good” first language - it’s just what was around. But it passed the litmus test of letting me quickly iterate from writing calculator-crashing output loops to making little games for my friends.
For its virtues, Elixir was originally developed to serve a community of experienced web devs trying to solve problems most newcomers don’t know about and won’t encounter — and it shows. I think most novices would be better served by a more “mainstream” scripting language like Python, Ruby, JS, etc.
Yeah, I've been excited about Elixir as well and I've been learning it this year. In fact I started writing about it as I've been learning it in the hopes that someone will find it useful as a tutorial to help them learn as well. I've called the series "Learn with Me: Elixir"
In fact, I've found that just the act of writing to teach Elixir to others has helped gain a much deeper understanding of the language. If anyone's interested in learning Elixir, please check it out and let me know if it's been helpful to them. There's something satisfying in helping other people learn.
reply