Comment by cogman10

2 days ago

I come from Java, I disagree.

The majority of rust's ugliness is the fact that it's handling a different problem than Java does. Java relies heavily on a GC to simplify. Rust does not.

I think the only thing that I find ugly in rust is that memory leaks are considered memory safe. [1]

That, unfortunately, means that you can't 100% rely on the language to not leak memory. Though, it's possible to leak memory in Java as well (Use `Deflate` incorrectly and you'll quickly find a hard to catch memory leak).

[1] https://brson.github.io/rust-anthology/1/memory-leaks-are-me...

> you can't 100% rely on the language to not leak memory

Start a thread with an infinite loop, you've just leaked some memory.

The language just can't prevent you.