Comments - What's the chance of a true Boolean data type in MariaDB?

6 years, 2 months ago Daniel Black

what is the bother and why are the workaround unsatisfactory?

 
6 years, 2 months ago Rob Lewis

Well, you might as well ask why bother having enumerated types when you could just use integers? A Boolean type can be viewed as an enumerated type with the two values TRUE and FALSE, besides of course being the fundamental element in logical expressions.

An important aspect of language design is to protect us—and anybody who might try to reuse our code—from making dumb mistakes. If you use, say, a TINYINT for a Boolean, sure as shootin' somebody will come along and assign integer values to it. Then what? When the problem is so easily avoidable with a proper Boolean type.

Consider Java: it gets a lot of criticism for demanding too much "ceremony", but in my experience this helps to prevent errors, or at least to make them obvious when they do arise.

 
6 years, 2 months ago Ian Gilfillan

I'm not aware of any plans to do this at present.

MySQL at one point stated in their documentation that they planned to implement this in a future release, in which case MariaDB would probably pull it in, but I can't find this statement on the MySQL docs any more. It may have been removed, and perhaps there are no longer plans to do so.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.