91

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?

Spencer
  • 5,582
nonopolarity
  • 3,023
  • I've never heard the term. We just say false where I come from: "The two false values in Perl are the number 0 and the empty string (that is, the string whose length is 0), as well as anything that evaluates to one of these two, including the undefined value." – tchrist Mar 30 '13 at 22:37
  • @tchrist Well, null is not false, although it is false-like because it might be evaluated as false. 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:39
  • @StJohnoftheCross I do not know what this null is, nor even false, since neither are reserved words or even defined identifiers where I come from. However, in DMR-ese, NULL is certainly a false value, considering it is #defined to be 0. Perhaps you are thinking of "\0", which is true since it points to something. However, even though p when set to "\0" is necessarily true, *p is false since its pointee is (char *)0. – tchrist Mar 30 '13 at 22:50
  • 8
    In many databases, null is a particular value which is actually nothing at all, not even zero. Similarly false is a Boolean value, which is neither null nor zero. But to work with either null or false 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. – St John of the Cross Mar 30 '13 at 23:03
  • 4
    But we have heard truthiness recently. – GEdgar Mar 31 '13 at 00:10
  • 1
    Perhaps a better word is false-like; for example "The only two false-like values in the Ruby Language is false and nil". Certainly I have never heard the term falsy - it just sounds made up to me. – Matt Mar 31 '13 at 00:19
  • 3
    The only spelling I know for what those two non-words sound like is "falsie": Main Entry: falsie Function: noun Inflected Form:-s Etymology: 1false + -ie : a breast-shaped usually fabric or rubber cup that is used to pad a brassiere — usually used in plural [falsies]" (from M-W 3rd Unabridged Dictionary). –  Mar 31 '13 at 01:25
  • I came here to see if one is preferred over the other. I'm leaning towards falsy because it more clearly reads to me like "fol-see", whereas falsey reads to me like "fail-see". – CJ Dennis Sep 10 '17 at 01:57
  • 1
    @Matt the problem with 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. – mendota Feb 22 '18 at 22:15

3 Answers3

65

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:

  • x is false” (clear)
  • x is false” (ambiguous: is x false or is it a different false value?)
  • x is falsy” (clear)

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.

Jon Purdy
  • 32,386
  • 1
    How about truthy vs truethy (or truethey)? – P Varga Aug 17 '15 at 17:13
  • 2
    @PeterV well to follow @Webveloper 's reasoning, it should be truθy instead. Er...except that it's not so easy to type :) – Andy Nov 15 '16 at 04:33
  • 1
    @Webveloper although if compression is used it will probably only add O(1) bytes ;) – Andy Nov 15 '16 at 04:34
  • 7
    Seems like "falsy" is the preferred way, see the MDN docs: https://developer.mozilla.org/en-US/docs/Glossary/Falsy – dmon Jul 12 '17 at 17:07
  • @Suncat2000 if that's a joke, it's a bad/misleading one. the MDN web docs are a wiki. if falsy is being used on those pages, it's by definition the preferred term of the community. – mendota Feb 22 '18 at 22:18
  • "... it's by definition the preferred term of the community." No it's not. It's just the preferred term of the person who wrote the article. As this answer mentions, the term "falsey" (or "falsy") is so new, and not exceedingly common, that "the community" - that is, who ever happens upon the article - simply accepts the word as is, without notice of either the presence or absence of the 'e', since with either spelling, it's meaning is clear. – Self Evident Jul 31 '18 at 20:45
  • MDN has spoken. "Falsy" it is. – J.Ko Sep 03 '20 at 17:18
  • 1
8

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.

tchrist
  • 134,759
  • 8
    For some geeky reason, the computer programming world has long maintained a tradition of using words in new ways, with a studied obliviousness to their prior, rude meanings: for example, 'dump'. 'Falsey' is merely another word in this long, and quite useful, tradition. – MarkDBlackwell Nov 11 '14 at 19:11
  • 4
    @MarkDBlackwell - Do note that "dump" has a long (and un-treasured) tradition in the computer programming world, likely going back to the mid-60s. And if you think that this use of the word is not "rude" you've never had a 3-foot-high stack of "dump" dropped on your desk Friday afternoon. – Hot Licks Mar 05 '15 at 23:16
  • 11
    @MarkDBlackwell In addition to Hot Licks' response, I'd say that "dump" in the CS sense, both as noun and verb, is merely another application of its preexisting meanings even without the vulgar one, particularly the ones related to unloading/releasing contents. (For example, "dump truck".) – JAB Apr 02 '15 at 14:35
6

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.

  • 9,155 results for falsy (7,674 results for "falsy" in quotes)
  • 3,920 results for falsey (3,302 results for "falsey" in quotes)

This seems to indicate that both versions are in use, and that falsy is preferred.

Liam
  • 211
  • But I'm sure if you compared the frequency to other similar terms, both spellings would hardly ever be used. I've been in the computer biz for 50 years and I don't recall running across either term. – Hot Licks Jun 23 '22 at 21:53
  • 1
    Some programming languages do not have the concept of "falsy" at all. It is related to the concept of loose vs strict typing. I think that strictly-typed languages (C, Java) might not have a need for the word. I mostly work with loosely-typed languages, such as JavaScript and PHP, and in those communities I have encountered it quite often. People also use alternative phrases such as "evaluates to false". – Liam Jun 23 '22 at 22:52