Hacker News new | ask | show | jobs
by moritzwarhier 6 days ago
undefined is not less absurd because there are parts of the standard that allow you to differentiate between

  undefined 
and a non-initialized value.

Of course you shouldn't do that, but I once encountered a library that behaved differently depending on whether an option in an options bag object was not present or explicitly set to undefined.

You can run into similar ugliness with function parameters, if you do evil things like using

  arguments
And of course you can explicitly check keys of objects, including parameters that are going to be destructured.

All not things you should do, but taints the "purity" argument, doesn't it? :D