3 ms·
So, being able to have a value or a reference vs everything always being a reference is a pretty massive difference. Option types instead of nulls is also a pre
by gameswithgo 7y ago
So, being able to have a value or a reference vs everything always being a reference is a pretty massive difference. Option types instead of nulls is also a pretty large difference. Generics being better from a performance perspective is a large difference too.
As well, traits are quite a bit different than classes, but not always in a good way!
- Polyisoprene 7y agoHopefully Java will support proper values regarding inlining and on-stack allocation for non-primitive types soon, but yes option types are a benefit in Rust as long as you’re not using any more advanced reference libraries.
- tene 7y agoCan you explain more about "advanced reference libraries", and how they interfere with the benefits of option types?