From: clubley@remove_me.eisner.decus.org-Earth.UFP   
      
   On 2025-08-18, Arne Vajhøj wrote:   
   > On 8/18/2025 3:42 PM, Arne Vajhøj wrote:   
   >> On 8/18/2025 8:37 AM, Simon Clubley wrote:   
   >>> It is _always_ safe to write code which assumes short circuiting is   
   >>> not in use and it will work exactly the same even in the presence   
   >>> of a compiler which generates short circuiting code.   
   >>   
   >> Not true.   
   >>   
   >> Not if the second expression has side effects.   
   >>   
   >> I am sure that you don't want expressions with side effect. But   
   >> it happens.   
   >   
   > Function calls is a classic example of potential side   
   > effect, but many languages allow assignments in expressions.   
   >   
   > Python 3.8 introduced the walrus operator.   
   >   
      
   Then Python has lost the plot. When you do ugly things like this, then   
   the easier it is for subtle errors to slip in. Also, you write code once   
   (hopefully), but read it many times.   
      
   Simon.   
      
   --   
   Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP   
   Walking destinations on a map are further away than they appear.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|