I've been working with Js/Ts as a backend developer and I would like to get some suggestions about what new language to learn right now. I've been thinking about Elixir or Rust, focusing on creating WebApis and Blockchain technology. I am passionate about the funcional way but I'm now confident about Elixir in Blockchain. Rust seems like have more jobs about it than Elixir in a little research. Someone could give me some advice? Thank you.
Golang is to my mind by far the greatest bang for your buck in terms of investing your time it has a low barrier to entry. Elixir is fun and all, but it is VERY VERY niche. You are very unlikely to find a job directly requiring Elixir. Rust is a good option depending on what you want to achieve but golang is a great general-purpose language that has a very approachable learning curve, great documentation and a lot of jobs available. There are some very high profile projects written in golang. Docker, Kubernetes, InfluxDB and Grafana just to name a few. I was at this same junction at the end of 2018 having spent a lot of time in JS/TS & Ruby. I had already learned Elixir and done a couple of projects in it and I switched to Golang as I didn't want to learn niche languages. I have never regretted my choice. Obviously, every tool has its place but golang is a winner if you want to learn something new :)
For web development I would suggest to take a look into Elixir. Elixir is extemely good for real time apps through websockets, apps with a need of high concurrency and / or apps where you need to process hundreds of thousands of states of differents users in parallel thanks to the actor model that comes with Erlang virtual machine. To solve these kind of problems in another stack could be really hard and painful (including your current stack).
It's true that Elixir is a niche stack ( It deserves way more popularity in my opinion), so, if your concern is to learn something that would keep you inside the trend and market, instead of Rust or Elixir I would suggest Go. Go it's another outstanding language, will a lot of virtues, small and easy to learn, with it for example, you could compile the same application to different operating systems just with a special compiler command (And the compiler is blazing fast). You can also start with a lot of good libraries that helps you to keep your code clean and under control and of course, it's performance is very good too.
Hope my suggestions could be helpful.
Best regards, and happy coding!
Elixir is very interesting and have great parallel and safety features. Go is too simple in my opinion. Sure, it's easy to learn, but when you implement an application it doesn't feel as productive as higher-level languages. Sure, it's a bit better than C but we have plenty of other choices!
* String interpolation? None, use the error-prone sprintf.
* Error handling? Go only provides multiple return values, and you'll make one of these values an error. Be prepared to write `if err != nil { return nil, err }` millions of time.
* Generics? They have finally arrived but in a simplified way, which doesn't allow to remove all duplicated and boilerplate code. No functional programming for you!
* Default arguments? Not with Go. Well, that's a pity.
* Dynamic libraries for plugins? Somewhat supported but that's going to be removed (see discussions on golang's github repo)
IMO the only benefit of the Go language is its lightweight and easy-to-use concurrency runtime.