DEV Community

Discussion on: Is Rust going to Replace Java?

Collapse
 
mate3241 profile image
mate3241

I don't know much about Rust, but from what I gather, it has about the same chance of replacing Java as JavaScript replacing C in the Linux kernel. Would make roughly the same amount of sense too.
Also, 3 vs. 5 lines in a hello world program proves what exactly?

Collapse
 
overdash profile image
Pro

I doubt rust would replace Java but it defo has more of a Chance replacing Java than JS has replacing C.

Rust is intended to actually replace C++; it adds all the safety features needed to make responsible code with C/C++, but brings a modern syntax with what I'd say is by far the most helpful compiler ever.

Collapse
 
lexiebkm profile image
Alexander B.K.

If I want to build a desktop GUI app using GTK, I would certainly pick C++, because Rust executable size is big and takes very long to compile.

Thread Thread
 
llaith profile image
Nos Doughty

Err... and the C++ one will likely have bugs and race conditions, and the Rust one won't.

Do you not understand the value proposition of Rust?

Collapse
 
luizc91 profile image
LuizC91

I guess this isn't about the number, but the length of the lines. You can have less lines, but with a bigger length.

Collapse
 
udalrich profile image
udalrich

Rust has less boilerplate here, but only because there is nothing that needs error checking or making the borrow checker happy. I suspect a thirty line piece of java ported to scala and rust would have the fewest lines in scala. Java probably comes in slightly smaller than rust, but could easily be a little bigger.