Вut I got the impression that knowing of the Rust language
will subsequently be a necessary skill for people that using Elixir.
Maybe I’m completely wrong?
I ask in connection with the fact that learning such a complex language as
Rust will require a lot of time for a person who is not a polyglot.
I really love Elixir, but I’m afraid I don’t have enough strength and the ability
to fully learn Rust just to write short Nifs on it.
Maybe, if so, it is just need to learn a subset of the Rust language?
(But, when I look at the implementation of the lists in Rust,
I’m starting to feel half as good).
Sorry one more time. I’m lost, Please help the newbie.
Nah, the thing with Rust is that it’s a nice language and people are able to implement NIFs with it thanks to Rustler. And you need NIFs when you have already exhausted all the tools available in elixir/erlang or need to squeeze every bit of performance for a specific operation by working outside of the beam.
Writing NIFs is something that most Elixir developers won’t ever want/need to do. Unless you have some particular use case in mind which will require the use of NIFs, I don’t think you need worry. Cross that bridge when you come to it.
Because it makes it easy to interface rust, and takes the burden of a lot of boilerplate code you had to write otherwise to interface with the erlang distributed C-Headers for writing NIFs.
And Rust is memory safe and fast, C is just fast. Thats why Rust is so much prefered over C, though its possible to write NIFs in C or C++ as well, or even Pascal or anything else that is able to call into C and gets called from C. But not everything makes sense…
Erlang and Elixir are excellent glue languages, and excellent in handling a lot of network requests at once. You’ll be very hard-pressed to find another runtime that does these things so rock-solid and fast.
That being said, they definitely fall short if you need mega-fast processing that requires pure CPU muscle – like various matrix calculations, deep learning, image processing, those kinds of things.
People praise Rustler because, as @NobbZ said, it makes it very easy to integrate your own Rust code with your Elixir code. But that’s only if you need it. Most of the BEAM projects are perfectly fine being Erlang or Elixir only.
Thanks for the answer!
But I mean the other.
I have poorly formulated.
Do not you think that practical skills with Rust
become a prerequisite for hiring?
Аnyway, next shot glass is for you.
Thank you.
While I can agree that you dont need to know Erlang to know Elixir, there is a caveat to that. Knowing Erlang can make you a better Elixir developer.
Many devs who hit Elixir coming from Ruby or Python, for example, often miss some of the important nuances of the BEAM runtime and of OTP. If you have the time, I recommend reading Erlang in Action; it’s my single-most favourite book for teaching proper use of OTP and how BEAM works. I promise you you will see Elixir in a whole new light. Another great book is The Little Elixir and OTP Guidebook, but that’s no as deep.
If you want to go even deeper Designing for Scalability with Erlang/OTP goes even deeper. It’s the best book on architecture I’ve read in any language.