11

Question

I am trying to find a word, other than Boolean, that represents a true or false value. Is there such a word?

Context

I am designing a programming language that is meant to be as easy as possible to understand for those who know nothing of programming. I am trying to name the fundamental types in a way that portrays their purpose to the target audience well. For example, instead of float or even floating-point number, the data type is called decimal. After much thought and use of a popular search engine, I cannot think of an alternative to Boolean for true or false values.

The reason I do not wish to use Boolean is that people who have not been exposed to programming or similar logical thinking simply do not know what it is, which is exactly what I am trying to avoid.

  • For various reasons I often needed programming variables that simply had to be switched between one of two possible values (usually, but not always, True/False or 0/1). In the end I just defined a class called TOGGLE to handle it. – FumbleFingers Apr 25 '14 at 20:45
  • @FumbleFingers that's a great one, thank you! Togglable (or maybe switch?) is definitely easy for anyone to understand, even if it is a bit of a mouthful. – OMGtechy Apr 25 '14 at 20:50
  • 1
    flip‎‎‎‎‎‎‎‎‎‎flop – tchrist Apr 25 '14 at 20:50
  • 1
    You will have types based on formats? And I disagree that decimal gives anyone, programmers and non programmers the idea of floating point data. It really doesn't say much to anyone. Other "simple" languages have just used doubles with everything and dispensed with all other numeric types. – Oldcat Apr 25 '14 at 23:38
  • 2
    Is your floating point stored in base 2? (e.g., is it an IEEE floating point?) (If so, "decimal" is a terrible name.) Most "decimal" types in programming languages store their value in base-10, trading a bit of performance for being able to store whole (decimal) digits. (As opposed to a binary type, which will store fractional decimal digits.) (Also, in this regard, it's not just a "formatting convention": it directly relates to how the value is stored, which has consequences on what values are representable by the type.) – Thanatos Apr 26 '14 at 2:57
14

Binary - in the sense of two values, but perhaps still too computer-y a word.

Logical - which has a history of being used in FORTRAN and some COBOLs, and thus might represent a less influenced way of discussing these values.

Truth, Truth-Value - as in whether or not something is true, rather that what is or is not in fact true. That is what Boole called them, after all, and we then named them after him.

Dichotomy / Dichotomous - again, having two values, but also linked to logic more than math.

The same goofy Lisp people who first called the pound sign 'hash', the period 'dot' and the exclamation point 'bang', did so in the same spirit you are working in. They also marked Boolean valued functions with a 'P' (because it looked like a '?') and referred to them as "whether" functions, as in 'whether or not'...

|improve this answer|||||
  • Thanks for your help. The only issue I have with binary is that it implies that the data is stored in a bit. It is certainly the best I've heard so far though and more intuitive than Boolean. It amazes me that it's so hard to think of a common English world for this! – OMGtechy Apr 25 '14 at 20:23
  • My, you are quick. I don't know whether I added the last one before or after you replied. It might actually be the best option, as it captures the logic. But is seems a bit precious. – Jon Jay Obermark Apr 25 '14 at 20:25
  • 1
    @OMGtechy The problem with binary is that you are not conveying the data type properly. I think truth value is the more appropriate. This also allows for hinting at having different implementations of what truth value is. You could have a boolean truth value (boolean inheriting from truth value), but you could also have other classes of truth values that allow other implementations, like if you want to work with modal logic. – Anna Taurogenireva Apr 25 '14 at 20:44
  • 2
    @OMGtechy your first comment made me smile. I find it interesting how you assume that people who don't know Boolean (and can't be bothered to look it up) will be familiar with the concept of a bit. Or storage, for that matter. Come to think of it, even data and imply are pretty big words. If "binary implies that the data is stored in a bit" to you, then here's ten dollars that you've heard Boolean already. So the way I see it, out of all suggestions here only Truth-Value is remotely useful at all. Binary? P? Dichoto-wut? You man serious? – RegDwigнt Apr 25 '14 at 21:42
  • 1
    Right Logical is one I have forgotten, it has a history of use before Boolean caught on. One assumes that a good implementation of TruthValue in general could, in fact not be stored in a bit. It would probably have to allow a value of Unknown, so it would need at least two. I am still quite keen on Whether, but I go for cute. Think of the declaration. String name, Number dependents, Whether isRegistered, ... – Jon Jay Obermark Apr 25 '14 at 21:58
4

In my programming days I thought of these as Yes/No values: declared global constants Yes and No, with values appropriate to the language (usually 1 and 0), named variables which bore these values FooYN, with Foo representing an appropriate name for the True state (e.g. OnYN, DoneYN) , and if the language supported it declared a YesNo type with two possible values, Yes and No. I found it made my code a tad more readable.

|improve this answer|||||
  • + 1. I like this. I'll have to go through all the best candidates with some members of the target audience and mark an answer based upon what they prefer in practice. – OMGtechy Apr 25 '14 at 21:49
  • Late to the game as always, but I like where this one goes, and I would call it a 'maybe' value. Because until you know at runtime whether it is 'yes' or 'no', it's just 'maybe'. – tuespetre Jul 18 '19 at 19:38
  • @tuespetre Yah; but if 'maybe' is an option, if you actually don't know the value at runtime, then you've gone trivalent: you have to include an 'undefined' value. Is it still a 'boolean' then? – StoneyB on hiatus Jul 19 '19 at 20:15
  • @StoneyB ‘maybe’ is a symbol for an indeterminate value that is binary at evaluation time. It’s like there’s a ‘stack’ or ‘scheme’, where in one locale (in this case an unbound environment) it is ternary but in another it is binary. – tuespetre Jul 21 '19 at 7:15
2

Would constative apply?

Constative: being or relating to an utterance (as an assertion, question, or command) that is capable of being judged true or false

|improve this answer|||||
  • 2
    It terms of meaning it's great, but sadly is no more intuitive than Boolean. – OMGtechy Apr 25 '14 at 20:36
2

A word or expression for "boolean" that is easily identifiable by those who know nothing of programming?

You might pretty well have named that expression already.

True/false values.

|improve this answer|||||
  • By this are you referring to having Integer implicitly cast to a Boolean like C and C++ do? If so...interesting; I could eliminate the type altogether. – OMGtechy Apr 25 '14 at 22:02
  • 1
    @OMGtechy I'm pretty sure that he's just saying that "true/false values" would be an expression that means "boolean". Personally, I'd advise against using implicit casts from integer to boolean for a beginner language as the sole determiner. It leads to confusion for when a person uses a negative number vs 0 vs positive number. And what if they cast a non-int to an int and then treat it like a bool (say, casting a char to an int)? Much confusion for new users. – Doc Apr 26 '14 at 5:27
2

how about a yesno it has easy mnemonics and it's easy to understand. sometimes you have to invent words, that's being done all the time in programming languages :)

Source: IT Professional

|improve this answer|||||
2

How about switch, as in a light switch, which can be either on or off? The only problem is that this is used in many programming languages for multiple choice selections.

|improve this answer|||||
  • This is the only one that I was ever comfortable with, especially when I had to deal with other dualities. – Spencer Mar 28 '18 at 22:55
  • Some switches have more than 2 values or positions. – alancalvitti Feb 22 '19 at 20:29
1

I've seen the word flag used, and I like it a lot. Wonder why it hasn't been said here.

|improve this answer|||||
  • 1
    "flag" is jargon and not really better than "boolean", in my opinion. – Sebastian Negraszus Apr 26 '14 at 12:06
  • 1
    Eh. Its cultural references are to train lines and mailboxes, right? So it may be stuck in time. As its original references disappear, it may be becoming less of a metaphor and more of a fixed jargon word. (Like radio-button: I've seen literal, physical radio buttons, but my nieces haven't. When they see them on the screen, there is no metaphor, that is just what they call them.) – Jon Jay Obermark May 2 '14 at 18:32
0

A Proposition:

From Wikipedia

Aristotelian logic identifies a proposition as a sentence which affirms or denies a predicate of a subject. An Aristotelian proposition may take the form "All men are mortal" or "Socrates is a man."

|improve this answer|||||
0

This may be too late but anyway... I think the word 'Trueness' could be the one that you look for. 'Trueness' can be considered as a state to be or not to be True.

|improve this answer|||||
  • 1
    Welcome to ELU, please consider adding sources to support your answers. In this case, I don't think trueness encapsulates that is binary (i.e. either true or false). – JJ for Transparency and Monica Mar 28 '18 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.