DEV Community

How to combat JavaScript fatigue with Rust

Bastian Gruber on March 20, 2019

Do you find yourself in any of those thoughts when creating applications with NodeJS? "I for sure need to pick the right npm module to solve this...
Collapse
 
willvincent profile image
Will Vincent

Ok, I'll be the contrarian...

There's a lot of "Rust is awesome" fanboyish opinion here and it's very light on actual reasons WHY rust is better.

Seems also very unlikely that just because something compiles it could be considered stable with anything close to 98% certainty ... Without adequate testing.

Most of the other stuff you can do once you learn rust can also be done with node, or lisp, etc.

Rust may really be the best thing ever, but there's not enough actual substance in this post to prove it's worth learning.

Collapse
 
simonhaisz profile image
simonhaisz

Yeah, if you want to learn Rust feel free, it's a great systems language. But I'm struggling to understand how someone who's having problems with ESLint is going to have a great time with the borrow checker.

Rust helps writing secure, stable, high performant, thread-safe code. For most use cases that node is being used for, they don't have a problem that rust solves. Rocket is very cool but unless you need the performance I don't see why you would pay the dev cost to use it over express or asp.net or whatever.

If you want to evangelize rust and create more rustaceans I think you should write more about the things that rust is good at and how it's worked well for you.

Collapse
 
gruberb profile image
Bastian Gruber

Hey Will, thanks for this answer!

I don't think "fanboy" is an appropriate term. Especially not in programming languages.

Feel free to click through the refrences (I highlighted my points with links). Especially read through the NPM paper and the rocket talk on Rust.

A 5 minute read is never any substance for anything, but should give you an idea. With the provided links you have enough to read and watch for probably a whole day.

Collapse
 
willvincent profile image
Will Vincent

I'll look into it, when I have time to look into it. My point simply was that you didn't provide a lot of compelling proof that it's "better" and many of the reasons provided aren't much more than opinion, really :)

Thread Thread
 
gruberb profile image
Bastian Gruber

That's good to know! Well you should always take your time going through the post and looking through references.

But that's an inspiring point and I will start a series where each post points out a very specific advantage of Rust!

Thanks for the input Will!

Collapse
 
vitalcog profile image
Chad Windham

Enjoyed the post overall and I'm always looking for my next language to learn. Just got done dabbling with Elixir and have been hitting C#/dotnet stuff currently. Rust is something that is always on my radar. Though I do need to poke fun at one comment.

"NodeJS could end up with the same fate as PHP"

A quick google of "how much of the web is PHP" returns this

According to W3Techs' data, PHP is used by 78.9% of all websites with a known server-side programming language. So almost 8 out of every 10 websites that you visit on the Internet are using PHP in some way.

I understand what you mean, but almost 8 out of 10 isn't a bad fate to have as a language!

Collapse
 
gruberb profile image
Bastian Gruber

That's very true Chad. It was a provoking article. What I want to deliver is: Companies who build new products choose other languages then PHP (not all of them of course). So the fade of PHP means: Smaller job market, maybe more competitive with lower hourly wage!

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
gruberb profile image
Bastian Gruber

It depends on how large and critical the services are you are building for sure!

Once you reach a level where you care about speed, safety and correctness, you will look for options! Rust is one very compelling one!

Besides the other reason I am mentioning! Feel free to bookmark the article and come back in a few years to re evaluate!

Collapse
 
victorhqc profile image
Victor Quiroz

Great read! I come from Node.js as well and learning Rust in the last months has been amazing. I feel like many new doors that were unaccessible just opened. And using a new language feels so refreshing after years of being only a JS dev. Thanks for sharing! I can relate of what you wrote for sure.

Collapse
 
gruberb profile image
Bastian Gruber

Interesting, I will start a series which highlights the reason more in depths and shows them vs. others language. Thank you for your input!

For now: Just click through the highlighted texts (links) and see if you like what you see.

Rust is safe, the "safest language out there" through the compiler and the design of the language.

Also, since it's a low level systems language, you can basically create anything you want :)

Collapse
 
ben profile image
Ben Halpern

Great post

Collapse
 
gruberb profile image
Bastian Gruber

Thank you Ben!

Collapse
 
aviaryan profile image
Avi Aryan

Time to learn rust!

Collapse
 
gruberb profile image
Bastian Gruber

Mission accomplished :)