Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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!



Hopefully 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.


Can you explain more about "advanced reference libraries", and how they interfere with the benefits of option types?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: