PEP 285: Adding a bool type
johnroth at ameritech.net
Sun Mar 31 23:30:31 CEST 2002
"Erik Max Francis" <max at alcyone.com> wrote in message
news:3CA75DAC.17647CEA at alcyone.com...
> Ralph Corderoy wrote:
> > Terry Reedy wrote:
> > > C. Anyone learning Python has some idea of truth and truth values.
> > > But I am sure there are some with no idea of what 'bool' means and
> > > only a vague idea about 'Boolean'. Better formalizing Python
> > > values should make them even easier to learn; why not call them
> > > they are?
> > That's an excellent point, as are the others you make. My Mum would
> > understand true but not bool or Boolean.
> I'm not really sure how beneficial this would be. In the real world,
> not everything about a programming language -- even a low-overhead
> language like Python -- can be instantly intuited by non-programmers.
> After some elementary level they're going to have to start reading.
> That bool (or boolean) is a Boolean type is not a hard concept to get
> across, and I don't see how calling it "truth" is really all that much
> more helpful.
> It's far better, in my opinion, to give it a standard name from
> science (bool or boolean) and let new programmers take the tiny little
> steps (in this case) to add a new word to their vocabulary -- a word
> that will help them in future explorations of programming and computer
> science, no less.
The trouble is that 'bool' as a data type **isn't** the standard
name from mathematics. Correct usage is something like:
"Boolean logic manipulates truth values." That is, the data
type is a truth value (see, for example, "truth table".) The usage
in programming languages is simply incorrect linguistically.
Python has always had Boolean logic - and, or not and
so forth. What's being added is the truth data type.
> Excessive attempts to make terms more approachable can lead to
> in the degenerate case, resulting in just a new form of terminology
> now nobody understands.
But nobody has suggested calling it the Aristotelian data type.
More information about the Python-list