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?
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI 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 :)
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.
null
is a particular value which is actually nothing at all, not even zero. Similarlyfalse
is a Boolean value, which is neithernull
nor zero. But to work with eithernull
orfalse
they may need to be given a numeric value (generally zero):null
,false
and zero are "false-like", or falsy. Similarly truthy is true-like: non-null
,true
or non-zero.false-like
is 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.