Is there a single word meaning "not null"?

In the if statement, we say x! = Null and read it as 'x is not null'. In the function name that you want to say "NotNull" or "IsNotNull", it feels a little more complicated. Is there one word that means to be in a state that is "not null"?

The best that I can guess so far is “initialized,” and I feel that this is a terrible word because it is too long. b) you can “initialize” something to zero. Another word that I have considered and reject is “something,” because it is too vague. And I did not like NotNull, because these are two words, and it looks like a double negative.

(If there is no such word, then I think we should create it, and your suggestions are also welcome as answers. :)

Edit: on the contrary, the value null, I mean that the word should be useful for describing the state of a variable, and with this use, the value of the variable can be anything except, of course, zero.

+8
source share
7 answers

PHP has a function called isset - I think there is no shorter version.

+3
source

It depends on your preference, I think isset / is / set / exist / has / ...

But don’t you think that the readability of the code is more important to understand and write than to shorten every word

+4
source

I would use the term usable , since, in my opinion, the link is suitable if it is not null ...

But, as not speaking English, I can’t appreciate the relevance of my proposal.

+2
source

I suggest is or exists . However, there are many conflicts with existing names and syntax.

To work is , you need to sort it as if it were uppercase and in bold:

if ( IS x) ...

In practice, I think that exists will work better.

+2
source

SIGNIFICANT

The NULL clause here may be considered a value in some languages, so the universal use of VALUED as the antithesis of NULL is not necessary.

However, in PHP, VALUED is clearly opposed to NULL .

+2
source

I am using IsSet for the method name.

+1
source

In French, I saw the term "home" used when talking about variables whose values ​​are sets, for example, a type variable when asked if a type is empty or inhabited. A “habitable” type is a type that is not an empty type. I find this term descriptive in English, but I'm not sure how much this will shock readers, especially when it comes to variables that do not represent sets.

0
source

All Articles