3 ms·
Rust makes use of some more advanced type features than Java has. You’ll want to focus on some of the differences between traits and interfaces. Additionally, i
by bluejekyll 3y ago
Rust makes use of some more advanced type features than Java has. You’ll want to focus on some of the differences between traits and interfaces. Additionally, in Java you’re probably used to a lot of runtime dynamism, this is possible in Rust, but not something you usually need to use. To understand this better, look at dyn object safety.
The biggest thing in Rust that you need to become familiar with from Java is the ownership system. First, Java is a default copy-by-reference language, whereas Rust is move by default. So learn the difference between, T, &T, and &mut T. Learning the ownership system will make you disappointed in Java’s thread-safety story. Rust makes thread safety and multiple references to values very obvious and you need to be explicit about how things should be shared. This will probably be your biggest hurtle, based on my experience.
Read the book, these concepts are all explained very nicely: https://doc.rust-lang.org/book/ https://doc.rust-lang.org/book/