3 ms·
Please don't flame me if this is an ignorant question, but how is uninhabited different from Javascript's undefined? That's what I would use undefined for in JS
by zebraflask 8y ago
Please don't flame me if this is an ignorant question, but how is uninhabited different from Javascript's undefined? That's what I would use undefined for in JS (very loosely speaking).
- Veedrac 8y agoYou can actually set a variable to `undefined` in Javascript. You can't set a value to an uninhabited type─there is no value that represents the type.
- zebraflask 8y agoI get it, so the concept is closer to declaring a variable and that's it, nothing further happens. Thanks.
- sacado2 8y ago"undefined" is a type that has exactly one possible value. An uninhabited type has no possible value.