4 ms·
Java is a bad language to work in because it's not expressive, not because it protects programmers (which it doesn't). Compared to C/C++, yes it does. Java pro
by kyllo 11y ago
Java is a bad language to work in because it's not expressive, not because it protects programmers (which it doesn't).
Compared to C/C++, yes it does. Java protects you from out-of-bounds array access, uninitialized access, buffer overflows, use-after-free, double-free, etc etc.
- hawleyal 11y agoSo, basically nothing in real world domain. The protections are basic at best. The most common errors are runtime exceptions, zero protection offered. YMMV.
- kyllo 11y agoThe Heartbleed Bug[1] sure felt like a real world domain problem to me. If OpenSSL were written in a memory-safe language like Java it would not have happened. [1] http://heartbleed.com/ http://heartbleed.com/
- kazagistar 11y agoMemory safety is a protective feature as much as sending texts is a smartphone feature. Sure, it is nice and very useful, but almost all languages provide it, so it does not count for much these days.
- MrBuddyCasino 11y agoThats how it should be, but the frequency of C/C++ threads on HN and the discussions about memory safety that will inevitably follow unfortunately paint a different picture. God I hope Rust will shoot C++ in the backyard and put it out of its misery.