Skip to content

Comment on The WHY of WAT - understanding why 'JavaScript is Crazy'parent

Comments

Nitpick: Java does have pointers in the sense of indirect references, so it makes perfect sense that a NullPointerException can exist, even if having nullable references in general is a bad idea.

Java has references but not pointers, in that you can't do arithmetic with them. This actually does increase safety substantially; you can still get a (badly-named) exception by trying to dereference a null reference, but it's a lot harder to turn what was supposed to be a pointer to an input buffer into a pointer to your program's executable code.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.