3 ms·
> why does JavaScript need a false and an empty array and a null and even an undefined?) Why does Lisp need a 0 and a nil? Because numbers are conceptually dif
by adwn 4y ago
> why does JavaScript need a false and an empty array and a null and even an undefined?)
Why does Lisp need a 0 and a nil? Because numbers are conceptually different from lists, and the number 0 is conceptually different from no number at all.
Why does JavaScript need a false and an empty array and a null and an undefined? Because all of those represent different concepts. Trying to stuff as many concepts as possible into a single representation doesn't necessarily make a language better (though I'm certainly not claiming that JavaScript is the epitome of good language design).