-
Notifications
You must be signed in to change notification settings - Fork 23
Nit: "nullary" misused #3
Comments
I suggested the term to mean "null or undefined"; if it has an actual meaning that differs than we certainly shouldn't use the term. I think it's valuable to have an "X coalescing operator", where "X" means "null or undefined" - do you have thoughts on a good term for that? |
I've updated the slides to refer to this feature as the existential operator. The CoffeeScript flavor of this operator (http://coffeescript.org/#existential-operator) specifically applies to Thanks for the catch! |
|
To me that's confusing about to which it applies (null, undefined, or both) |
In the context of the optional-chaining proposal, it didn't mean that. |
I use the term "nullish" to refer to either |
The name “existential” does not suggest by itself “undefined or null”. You must have some CoffeeScript background in order to know that. Moreover, CoffeeScript also uses the term “existential operator” (as well as the same symbol ”?”) for optional chaining, which is semantically different than nullish-coalescing. “Nullish” seems a fine replacement for “nullary”. Or even “null”, as I don’t think that anyone would be confused by thinking it would not apply to undefined as well. |
Given we often use the terms "truthy" and "falsy", you could use the term "nully". Alternatively, we could use the portmanteau "nundefined" 😉. Generally its described as a "null-coalescing-operator", though that's less appropriate in the case where we are encompassing |
Some quick stats; Google search results quantity for...
(my hunch is that many of the It's unclear to me if this is a moot point (the operator itself has been renamed to "existential", but there seems to be a persistent desire to describe "null or undefined" regardless). I'll do a quick poll anyway: |
|
|
|
|
|
@rattrayalex There is also: |
Whatever term we choose here, it's going to be whatever the community zeitgeists on - "null" isn't going to survive that test, and i'm pretty sure "nundefined" won't either. Since "nullary" isn't good, "nullish" or "nully" are probably the only two that have a chance of the community embracing it. |
Informative but nully must be followed by |
@Mouvedia if it has to be described with such a context then maybe it is not the right word to use? |
@keithamus Would you introduce truthy without falsy? |
@Mouvedia I'm not sure the point you're trying to make. My suggestion is that if you need to describe how |
Esp; given previous comment:
@claudepache do you feel good about declaring |
I have no right on this repo (ask @gisenberg) |
@gisenberg reacted with 👍 to that question so I'll take that as a "case closed; |
Based on the feedback in this issue, I've updated all references to nullary to nullish. |
This is minor, but worth getting right: per https://www.bing.com/search?q=nullary+definition, "nullary" means taking no arguments or having trivial domain. Thus if null or undefined is a nullary value so are 42, "hi", and false.
Precedent in es-discuss is to use some variation on existential operator, but there are too many variations ;-). CoffeeScript uses "soak", which is evocative. Not sure what to suggest, but I don't think "nullary" should be abused. Thanks.
https://esdiscuss.org/topic/existential-operator-null-propagation-operator
The text was updated successfully, but these errors were encountered: