There should be multiple ways to express an absence of a value
For example, JavaScript has both null and undefined to express an absence of a value. PyHP++# should have multiple ways of expressing a lack of value, each with its own special behavior.
If we're just going based on our source languages, our options are null, NULL, and 0.
EDIT: Oh, and nullptr.
And None from Python
Should they all be aliases for each other? If not, should they equal each other?
They should all mean slightly different things and be used in slightly different contexts.
There should be an order of precedence for these values, in case people decide to compare them to each other. For example, if the order was something like:
-
undefined -
None -
no - any valid data type
then comparing, for example, undefined == None would return undefined, and comparing 5 == no would return no.
@iptq Love this idea. I may implement it into the specs if I get the time, or you can write your own if you like.