What is your preferred boolean pair: 1/0 Yes/No True/False?

dittonamed picture dittonamed · Jan 22, 2009 · Viewed 12.3k times · Source
  1. When dealing with MySQL, I typically use the BOOLEAN type, which is equivalent to TINYINT(1), or 1/0
  2. In most languages I work with, true/false is preferred
  3. When displaying forms, sometimes "Yes / No" makes more sense

Answer

Evgeny picture Evgeny · Jan 22, 2009
enum Bool 
{ 
    True, 
    False, 
    FileNotFound 
};

http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx