4 ms·
Which language has both a "None" and "null"?
by remram 5y ago
Which language has both a "None" and "null"?
- efficax 5y agojavascript, at least, has "undefined" and "null", an infuriating duality of falsiness. PHP also has a notion of not being set as well as being set but null.
- remram 5y agoJavaScript is what we are talking about in this thread, making the point that JavaScript is similar to JavaScript does not help ;-)
- deleted 5y ago[deleted]
- mynameisash 5y agoScala, as I recall. It encourages using Options (Some/None), but since it runs on the JVM and will often interop with Java libraries, you can also have nulls. Not exactly a language design, but an unfortunate reality.