Hacker News new | ask | show | jobs
by joosters 1887 days ago
Perl got this right decades ago with its 'undefined' status for unset variables, so you can tell the difference between false and undef
1 comments

That make me think more of Javascript, which distinguishes between undefined values (usually means “not set”) and null values.

You’re correct that a Perl scalar can always be set to undef, which is the Perl name for null. But that’s not really unique to Perl. For instance, while a Java boolean can’t be null, a Java Boolean can be.