Re: Replacing the "if" statement with an "if" expression which supersedes it

Spar <[email protected]> Fri, 26 Jun 2026 19:49:20 +0300
Newsgroups gmane.comp.lang.lua.general
Message-ID <03a5c9dd-4cd9-4396-9e27-04ea7ea4d374@Spark>
Funny that in LuaJIT we have the same debate with ternary operators literally right now :-)
https://github.com/LuaJIT/LuaJIT/issues/1475
On 26 Jun 2026 at 19:42 +0300, 'Calimero' via lua-l <[email protected]>, wrote:
> Le 26/06/2026 à 18:36, Andrey Dobrovolsky a écrit :
> > Hi Calimero,
> >
> > Really parentheses are not enough. Dealing with variables (not some
> > constants) require more boilerplate:
> >
> > a and b or (b and c)
> >
> > -- Andrew
>
> Honestly I cannot comprehend the intention of that code! Is it meant to mean `if a then b else c end`?
>
> If so, I think that this illustrates how my proposal has so much value, for its sheer clarity!
> Readability matters!
>
> Cheers
>
>
> --
> You received this message because you are subscribed to the Google Groups "lua-l" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
> To view this discussion visit https://groups.google.com/d/msgid/lua-l/ab9780b9-15c7-dbf3-dd1b-727be251ad6c%40free.fr.

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/03a5c9dd-4cd9-4396-9e27-04ea7ea4d374%40Spark.