home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 32,645 of 33,346   
   =?ISO-8859-1?Q?Pedro_Lamar=E3o?= to All   
   Re: Useful applications for boolean incr   
   13 Nov 12 11:54:05   
   
   From: pedro.lamarao@googlemail.com   
      
   { Please limit your text to fit within 80 columns, preferably around 70,   
     so that readers don't have to scroll horizontally to read each line.   
     This article has been reformatted manually by the moderator. -mod }   
      
   Em sexta-feira, 2 de novembro de 2012 16h27min47s UTC-2, Zeljko Vrba  escreveu:   
      
   > So, C++98 blew the (only) chance to define bool properly, i.e., as a   
   > non-arithmetic type.  Can anybody elaborate on how and why did we end   
   > up with a useless arithmetic type?   
      
   A long, long time ago, in a galaxy far, far away, every object was   
   either an integer number, a floating point number, or a composition   
   of those things in structs.   
      
   Creating a perfect (?) bool was probably never at stake; the type of   
   the test expression in an if statement probably was.   
      
   If the test expression of an if statement has perfect bool type, this   
   won't compile:   
      
   if (1) { /* whatever */ }   
      
   Is the amount of programs with lines like that countable? (Theoretically yes.)   
      
   And then there is always so little time, and so much to work on. Be glad   
   we got STL in the first standard version. That must have been crazy.   
      
   --   
    P.   
      
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca