3 ms·
Perl got this right decades ago with its 'undefined' status for unset variables, so you can tell the difference between false and undef
by joosters 5y ago
Perl got this right decades ago with its 'undefined' status for unset variables, so you can tell the difference between false and undef
- maxlybbert 5y agoThat 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.