Open dsyme opened 9 years ago
It should be struct instead of class
Right! As things stand, having two possible values, the so-called type "nothing" is actually equivalent to "Boolean"!
public class AwesomeBoolean
{
public Nothing True { get { return Nothing.Instance; } }
public Nothing False { get { return null; } }
}
LOL!
On Sun, Mar 8, 2015 at 8:57 AM, Daniel Lo Nigro notifications@github.com wrote:
public class AwesomeBoolean { public Nothing True { get { return Nothing.Instance(); } } public Nothing False { get { return null; } } }
— Reply to this email directly or view it on GitHub https://github.com/gregoryyoung/nothing/issues/2#issuecomment-77736278.
Studying for the Turing test
The proposed fix (also the one adding "sealed") means we can no longer inherit from Nothing.
It seems clear that each and every thing "is a" nothing - maximum flexibility requires an open universe of possibilities (see also https://github.com/gregoryyoung/nothing/issues/24#issuecomment-77916676).
Further, inheriting a hidden something from Nothing is a well known tax avoidance strategy in some jurisdictions.
The "Nothing" type supports the "null" value in addition to the "Instance" value. That's a bug. Please update your programming language to make sure that it doesn't permit null values of this type under normal use. Do not close this issue until you have successfully done this.