logoalt Hacker News

0cf8612b2e1eyesterday at 5:50 PM1 replyview on HN

Under the Known Limitations section

  deleted and dead are integers. They are stored as 0/1 rather than booleans.
Is there a technical reason to do this? You have the type right there.

Replies

albedoayesterday at 10:12 PM

By "to do this" do you mean to not use booleans? It's because the value does not represent a binary true or false but rather a means by which the item is deleted or dead. So not only would it not make sense semantically, it would break if a third means were introduced.

show 3 replies