DreamBerd icon indicating copy to clipboard operation
DreamBerd copied to clipboard

Generalized Generic NaN to support "Not an <any>" data types.

Open SimHacker opened this issue 11 months ago • 0 comments

It's all well and fine that NaN is Not a Number, but why are numbers so special?

Every data type should have a corresponding "Not a" value. So Na<String> is "Not a String", Na<NULL> is "Not a NULL", Na<any> is not an any, Na<bool> is "Not a boolean", Na<Person> is "Not a Person", Na<bool(int*)> is "Not a function taking a pointer to an integer and returning a boolean".

And of course Na<NaN> is just float, and Na<Na<NULL>> is just NULL.

SimHacker avatar Mar 05 '24 12:03 SimHacker