Sorry for the ridiculous question.
В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.
So don’t worry about it.
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.
Thank you very much for the detailed answer.
But I didn’t understand why then the community is so
celebrating the appearance of the Rustler library?
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.
Thank you all very much.
But another question.
Could such a situation may be arise:
To learn the Scala, or clojure you need to know Java.
To learn the Elixir, you need to know Erlang and Rurt?
To learn elixir you only need to learn elixir.
Maybe later if you start doing some really, really cool stuff you might want to learn Erlang or Rust.
But at that point that’s a good problem to have … because you’re doing cool stuff
Thanks to all.
Аccording to Russian custom
I will drink for the health of everyone who answered me!
I have already started.
It was very pleasant to have a drink while
feeling support at such a distance.
Highly unlikely you’d have to learn Rust. Decent chance you’d eventually have to learn just a little of Erlang, to understand & use libraries.
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.
Not at all a prerequisite for hiring for the majority of web-app type development that Elixir is used for. But certainly an advantage for some jobs.
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.
Thank you very much.
I will definitely read it.
Do you think “Programming Erlang” (2nd edition) is not an outdated book?
No, Programming Erlang is not outdated.
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.
I’m sure it’s still relevant, though it may not cover newer syntax, like maps etc.