3 ms·
The problem is that "secure" isn't a well-founded concept. For instance, Java does the array bounds checks you're talking about (and throws an ArrayIndexOutOfB
by bartonfink 15y ago
The problem is that "secure" isn't a well-founded concept.
For instance, Java does the array bounds checks you're talking about (and throws an ArrayIndexOutOfBoundsException if they fail). It checks memory accesses and won't let you access memory that's been freed or is otherwise invalid. It does
However, I don't think anybody could seriously say that Java is totally "secure." There are plenty of security-related things that could go wrong (e.g. a man-in-the-middle attack) that Java can't handle unless the developer takes steps to prevent them. By definition, that isn't "by default."
If you want to prevent security problems "by default", you're going to need to specify each problem you want handled, and you're going to need to recognize that there are a lot of security problems that a language or OS simply can't stop by themselves.