|
|
|
|
|
by snappyTertle
3123 days ago
|
|
Learning Erlang/Elixir is like learning a new paradigm, or a new way to think about programming. You can then apply these concepts to other languages. It's made me a better programmer. Kotlin, IMO, is just a "better" java. It would be just learning new syntax if you are already familiar with java like languages. |
|
Agreed. It taught me three things primarily, both can be applied to other areas / languages:
1) Importance of fault tolerance (especially applied to distributed system). That is, trying to build a system out of small isolated components that talk to each other, and each can fail independently and be restarted safely. Did anyone say micro-services? Nah, the new rage is nano-services (stolen from here http://blog.plataformatec.com.br/2015/06/elixir-in-times-of-...). But there is no need to get all fancy, this also can be done with plain old forking OS processes. The important bit is that the memory has to be separate, either on different machines, OS processes, or in different heaps like BEAM VM does it. So threads, or greenlet or goroutines don't quite fit the bill here. (Thought if Rust's compiler can decide that memory will never be shared at compile time, it's also good enough).
2) Importance of functional programming. Passing state explicitly and dealing with immutable data ensures that there is less chance of confusion and it's also easier to figure out what is happening. Also easier to write tests, as there is less a need to mock everything.
3) Importance of hot code loading and traceability in production systems. Many of the platforms and languages offer some form of hot code loading and ability to set traces on functions and methods. But with BEAM languages it's all built in, integrated and it's a first class feature. This makes a difference in production, can update code with extra logging if there is a bug experience by only one particular customer and reproducing it is hard, or can patch a critical running system without taking it down.