Hacker News new | ask | show | jobs
by alharith 2342 days ago
This makes me not want to learn elixir. Learning one language and becoming masterful at it is hard enough. There's too many "learn this language, but also this other language and platform"'s in my life (JVM-based work, and anything in the front-end JavaScript world it feels like these days). It just feels like you are telling people "Here, learn this language, but also learn the assembly instruction set for your architecture as well" -- that's not the reason I choose to use higher level language.
5 comments

What does it mean for you “learning one language and becoming masterful”?

You can learn the syntax of Elixir, Python, Go, whatever very fast, but becoming a master is much less about its syntax - that is usually a trivial part. It is more about underlying standard library, concurrency, collection, execution model, GC, patterns, and caveats.

yeah probably it's not expressed very well. You don't need to learn the syntax of erlang to understand Elixir. You can call any erlang code from within Elixir in a format that almost completely looks like elixir (the difference is that Erlang modules have a colon and start with a lower case and Elixir modules are upper case).

You might need to learn to read erlang documentation. But I've done quite a bit in Elixir, from standing up websites to writing a VM orchestration engine, and the only things I've needed to read the erlang docs for were:

1) writing an Elixir library that wraps the builtin erlang :ssh module with a more elixirish syntax

2) writing an Elixir library that wraps the builtin erlang :gen_statem module with a more elixirish structure and syntax

3) writing an Elixir library that fixes and wraps the builting :tftp module with a more elixirish syntax

4) figuring out how erlang uses SSL so that I could write a two-way encrypted SSL rpc library.

I did them for fun, but all of these are either in prod or used to make production artifacts, and all of these are of course open source and available, so you can use them and not have to do what I did.

Also FWIW, I have read exactly zero of those books.

Don't be so easily discouraged!

I think there's a distinction between understanding and learning a language. In this case, it helps to understand Erlang in order to learn Elixir. Just like you're eventually going to need to be able to read some C if you dive really deep into Ruby.

Difference is that C is probably considered basic knowledge for a working programmer, Erlang isn't. Professional programming eventually leads to being a polygot anyway.

What if it saved you from having to learn kubernetes though?
You don't need to learn Erlang to learn Elixir. You can just use some what Erlang provides when you need it. Some people want to approach things very ground-up but I've taught people Elixir. It's fine to learn Elixir and you'll get to OTP and all the good stuff.