News for hackers. Stuff that matters.
Re:Never patterns, exhaustive matching, and uninhabited type... by zebraflask on Saturday August 18, 2018 @07:07PM (#17791353)
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).
Re:Never patterns, exhaustive matching, and uninhabited type... by Veedrac on Saturday August 18, 2018 @07:39PM (#17791533)
You 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.
Re:Never patterns, exhaustive matching, and uninhabited type... by zebraflask on Saturday August 18, 2018 @07:41PM (#17791541)
I get it, so the concept is closer to declaring a variable and that's it, nothing further happens.

Thanks.

Re:Never patterns, exhaustive matching, and uninhabited type... by sacado2 on Sunday August 19, 2018 @12:42PM (#17794984)
"undefined" is a type that has exactly one possible value. An uninhabited type has no possible value.