News for hackers. Stuff that matters.
Re:Rust vs C Pitfalls by lmm on Wednesday December 28, 2016 @10:10AM (#13270930)
No sum types (the Java alternative to Rust enums is the horribly verbose visitor pattern, so a lot of the time people don't bother). null. A verbose and unabstractable "checked exception" system (that the standard library uses poorly in places) that leaves many users resorting to unchecked exceptions (panics) instead. Uninitialized field problems because methods are virtual even when called from superclass constructors. Excessive overhead to custom types that leads to using weakly typed Strings etc. rather than domain types. Poor abstraction facilities that lead to a culture of "magic" annotations and runtime reflection (or worse, proxies and bytecode manipulation) e.g. @Transactional, @Inject.

Java is safer than C, but it's a long way behind a modern functional language like Rust.

There are no comments on this comment yet.