DEV Community

Cover image for Is Rust going to Replace Java?
Rithik Samanthula
Rithik Samanthula

Posted on

Is Rust going to Replace Java?

Hey Coders!!

A lot of you have been telling me that rust is soon going to replace java.

Looking at the perspective of the number of people using java, I would say Rust isn't going to replace java.

I don't think a language can fully replace another one.

Oracle released Java in 1995. It is still used worldwide by so many developers out there.

I mean, sure, Java is pretty lengthy and we need another way to make it easier to write code.

Technologies such as Rust and Go function the same way as Java but they are written in shorter code.

Hello World Written in Java:

class Simple{  
    public static void main(String args[]){  
     System.out.println("Hello Java");  
    }  
}
Enter fullscreen mode Exit fullscreen mode

Hello World Written in Rust:

fn main() {
  println!("Hello world!");
} 
Enter fullscreen mode Exit fullscreen mode

Well, Rust does have a lot of new more interesting ideas and concepts but we don't know whether they are going to be adopted universally.

There are also a lot of other companies that have java code written in their programs.

One advantage of using Java is that you have a lot of libraries and APIs available.

Well, Rust doesn't really have as many developers as Java does.

Rust might not be large enough to become a conventional language.

The Final Reason why I think Java won't be replaced is because the entire company of Android has a lot of servers that run on Java.

Overall, There is a possibility that Rust could replace Java but it most likely wont.

I hope I answered your question and I hope you enjoyed this blog!

And don't forget...

Keep Coding Y'All ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป

Latest comments (73)

Collapse
 
jimlynchcodes2 profile image
Jim Lynch

In terms of a simple REST backend, many companies choose to write this in Java, JavaScript, Go, Python, etc... because, well, they like the syntax.

But if you really want the fastest execution time and lowest dollar cost for your backend, yeah, probably Rust is the best choice actually.

People who realize this are probably expecting that the number of others who have realized this will increase over time and hence the usage of Rust will continue to grow and "steal market share" from other languages.

Collapse
 
lexiebkm profile image
Alexander B.K.

"Oracle released Java in 1995."
Uh... if Sun Microsystems still owned Java, we wouldn't be worried about license when using newer versions.

Collapse
 
andrewbrown profile image
Andrew Brown ๐Ÿ‡จ๐Ÿ‡ฆ

Better yet is Rust going to replace everything? lol

 
gklijs profile image
Gerard Klijs

Yes and no, although it's possible in principe to have a 'Kotlin' KVM maintened by JetBrains. So far the JVM is closely tied to Java.
I have a hard time seeing what you could do in Kotlin without any Java interop. Concurrent collections, networking, most of the JVM ecosystem, it's all Java.

Collapse
 
jfftck profile image
jfftck

There are plenty of the first generation of high-level languages still in use to this day, a large number of banks built on COBOL and have no need to change, so the majority of systems built in Java have no need or reason to be rewritten. If Java drops to the same level of usage as COBOL today, there will be an event that would cause a rush of hiring of developers who know the language, just like the Y2K bug had seen COBOL developers being paid top dollar.

Collapse
 
anatame profile image
Anatame

Another dumb shit article.

Collapse
 
shubhampatilsd profile image
Shubham Patil

Yeah Rust has a pretty low chance since Java is everywhere, but Java might be on the decline for most aspects of development (in terms that i'll clarify next). If a new project were to choose a technology for their servers, they would choose JavaScript or Python. If they wanted a native Android app, they would most likely choose Kotlin, of if they wanted a cross platform app, Flutter/React Native. For games, Unity/Godot/Unreal are much more approachable than things like LWJGL and whatnot. Java is a great language to learn programming with, but I'm seeing less adoption of it in present time. Also yeah, Java is pretty popular still since 10 year old startups used them for their services and don't want to change the code. It's like with PHP: Facebook still uses it but you rarely see a new company using PHP.

 
gklijs profile image
Gerard Klijs

Yes, but without Java, there is no JVM. And especially Kotlin, you really need Java libraries for some things..

Collapse
 
avantar profile image
Krzysztof Szala

Better ask yourself why would it replace Java at first place. Your question doesnโ€™t make much sense.

 
siy profile image
Sergiy Yevtushenko

Just finished article which explains my views in details.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.