3 ms·
Even more than the divide between older & more modern languages, I think specific context is key. I talk to lots of app devs who think that array indexing isn'
by favorited 8y ago
Even more than the divide between older & more modern languages, I think specific context is key.
I talk to lots of app devs who think that array indexing isn't "safe" in languages where OOB will trap – because for lots of UI operations (say, the user selected item #5 and our local datastore thinks there's only 4 items), the answer can really be to tell the user something went wrong, reload the UI, and try again. That's what "safety" to them.
I hear related perspectives with services – where devs understand that if they're doing OOB array access, it's a bug and needs to be fixed. But if that bug traps the process, now there's a potential DOS attack vector. They want some way of throwing away an invalid execution environment, but return to a known-good state without respawning.
Is Java a safe language? I think you have to start by asking, "in what context?"