home bbs files messages ]

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

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

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

   Message 242,215 of 243,242   
   Keith Thompson to bart   
   Re: _BitInt(N)   
   28 Nov 25 15:23:23   
   
   From: Keith.S.Thompson+u@gmail.com   
      
   bart  writes:   
   > On 28/11/2025 02:33, Janis Papanagnou wrote:   
   [...]   
   >> You can of course add as many commodity features to "your language"   
   >> as you like. I seem to recall that one of the design principles of   
   >> "C" was to not add too many keywords. (Not sure whether 'A.odd' is   
   >> a function or keyword above [in "your language"].)   
   >   
   > It is a reserved word, which means it can't be used as either a   
   > top-level user identifier, or a member name. With extra effort, it   
   > could be used for both, but that needs some special syntax, such as   
   > Ada-style "A'odd"; I've never got around to it.   
   >   
   > In Pascal (where I copied it from) it is a reserved word.   
      
   In Pascal, "odd" is not a reserved word.  It's the name of a   
   predefined function.   
      
   [...]   
      
   >> PS: BTW, I was always wondering why Pascal and Algol 68 supported   
   >> 'odd' but not 'even'! - In the documents of the Genie compiler we   
   >> can read: "This is a relic of times long past.", but beyond that   
   >> it doesn't explain why it's a "relic". I can only guess that it's,   
   >> as a special case, considered just unnecessary in the presence of   
   >> the modulus operator.   
   >   
   > Maybe because you can trivially define 'even' as 'not odd'.   
      
   Or maybe because odd(n) can be implemented as "treat the low-order bit   
   of the argument as a Boolean".   
      
   --   
   Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com   
   void Void(void) { Void(); } /* The recursive call of the void */   
      
   --- 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