I have seen both spellings of this word, falsy and falsey.
It can mean "something that is equivalent to false" in computer science, such as "The only two falsy values in the Ruby Language are false and nil".
What is the correct usage of this word?
I have seen both spellings of this word, falsy and falsey.
It can mean "something that is equivalent to false" in computer science, such as "The only two falsy values in the Ruby Language are false and nil".
What is the correct usage of this word?
I've always seen falsy and truthy. Falsey is a perfectly acceptable alternative and gives me just as many search results. The word is unfortunately too new to provide good sources. The ECMAScript Language Specification uses “⟦ToBoolean⟧” to refer to the interpretation of of non-Boolean values as Booleans, but makes no use of truthy or falsy.
These terms are widely used in discussions of dynamically typed programming languages such as JavaScript, Ruby, and Python, in which there is a Boolean data type but other values which can also behave like the Booleans true and false. It is a way to distinguish between false the noun and false the adjective:
false” (clear)false or is it a different false value?)As tchrist points out, Perl is a notable exception because it lacks a Boolean type, so falsy values are just called false, in the adjectival sense.
truθy instead. Er...except that it's not so easy to type :)
– Andy
Nov 15 '16 at 04:33
The only such word currently attested by the OED is the plural noun falsies, whose sense is given as:
A padded brassière; breast-pads.
It has its own Wikipedia entry, one which I must advise you is unlikely to be work-friendly in sensu stricto.
Given that it is a term with a specific meaning used by programmers, I searched stackoverflow.com to see how that programming community have used it.
This seems to indicate that both versions are in use, and that falsy is preferred.
nullis notfalse, although it is false-like because it might be evaluated asfalse. I'm sure "truthy" has come up before (although that might have been on SO). – St John of the Cross Mar 30 '13 at 22:39nullis, nor evenfalse, since neither are reserved words or even defined identifiers where I come from. However, in DMR-ese,NULLis certainly a false value, considering it is#defined to be0. Perhaps you are thinking of"\0", which is true since it points to something. However, even thoughpwhen set to"\0"is necessarily true,*pis false since its pointee is(char *)0. – tchrist Mar 30 '13 at 22:50nullis a particular value which is actually nothing at all, not even zero. Similarlyfalseis a Boolean value, which is neithernullnor zero. But to work with eithernullorfalsethey may need to be given a numeric value (generally zero):null,falseand zero are "false-like", or falsy. Similarly truthy is true-like: non-null,trueor non-zero. – St John of the Cross Mar 30 '13 at 23:03false-likeis you've got a really common operator in the middle of the word there. generally you want to keep computer science jargon from breaking the code that it'll be used in. – mendota Feb 22 '18 at 22:15