home bbs files messages ]

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

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

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

   Message 262,982 of 264,096   
   =?UTF-8?Q?Arne_Vajh=C3=B8j?= to Simon Clubley   
   Re: extending MySQL on VMS   
   15 Aug 25 19:48:14   
   
   From: arne@vajhoej.dk   
      
   On 8/15/2025 1:33 PM, Simon Clubley wrote:   
   > On 2025-08-15, Dan Cross  wrote:   
   >> In article <107n93n$13rjm$1@dont-email.me>,   
   >> Simon Clubley   wrote:   
   >>> On 2025-08-12, Arne Vajhøj  wrote:   
   >>>>       if(args->arg_count == 2 && args->arg_type[0] == STRING_RESULT &&   
   >>>> args->arg_type[1] == INT_RESULT)   
   >>>   
   >>> Is it guaranteed that arg_type[] will always have at least elements ?   
   >>> If not, that's dangerous unless the compiler you are using does   
   >>> expression short-circuiting.   
   >>   
   >> C is well-defined in this regard.  Boolean expressions in C,   
   >> created by combining logical subexpressions with the `&&` and   
   >> `||` operators, are documented to use short-circuiting behavior.   
      
   > Unless it's explicit in the language syntax itself, and given that   
   > I write code in multiple languages, I have long written code that   
   > assumes implicit[*] short-circuiting is not available.   
   >   
   > As such, whether implicit short-circuiting is available or not is   
   > not really that important to me, but I will admit I didn't realise   
   > C had it.   
   >   
   > [*] By implicit short-circuiting I mean something that's only defined   
   > in the language standard or implemented in a compiler, instead of some   
   > explicit syntax in the language itself to state short-circuiting is   
   > available.   
      
   In general I like the idea of writing code in a way that does   
   not require the reader to have memorized ten thousand things from   
   the language spec.   
      
   But I do not consider this a matter of remembering the specific   
   details about an operator - I consider this a matter of remembering   
   what operator a symbol represent.   
      
   I consider "short circuiting AND" and "non short circuiting AND"   
   to be two different operators.   
      
   And in C then && is the first operator not the second operator.   
      
   And understanding what operator each symbol represent is not   
   detail but core. IMHO.   
      
   Arne   
      
   --- 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