Hacker News new | ask | show | jobs
by laumars 4769 days ago
I really wanted to prove you wrong by finding some evidence that the quote you featured isn't included in the book, but instead I stumbled upon a page[1] about boolean data types which was equally inappropriate for a younger audience. So instead I found myself up-voting you.

In fact to further prove your point, the boolean page made reference to the history of the name, which even I was unaware of after 25 years of programming.

It's a great pity about the content of this book as it's actually a really good idea. But with the content as in depth as it is, I couldn't even justify buying it as to read to my kid as a novelty item.

[1] http://ecx.images-amazon.com/images/I/51BIi5OBjML.png

2 comments

Transcript:

> Named after George Boole, boolean is the most primitive data type, allowing for one of two values - true or false. Boolean operators are intended to represent truth values. Many languages contain a strict boolean data type, however, several languages, such as C and Lisp represent boolean values as the integers of 0 (false) and 1 (true). In most languages 1 and 0 are interchangeable for true and false.

I suspect the average lay adult pulled off the street would have a hard time understanding this, let alone a child.

Explained like I'm five: B is for Bit. A Bit is the smallest piece of Data a Computer can know. Arrays, and all Data, are made of Bits. Bits are either 0 or 1, nothing more, nothing less, and nothing in between.

(Booleans have no Business at B, Because Bits are Boolean)

Incidentally, Lisp doesn't even represent boolean values as 0 and 1, it represent them as nil (equivalent to '(), the empty list) and anything-but-nil. Indeed:

    * (if 0 "truthy" "falsey")

    "truthy"