News for hackers. Stuff that matters.
Re:LuaJIT 3.0 proposed syntax extensions by bruce343434 on Thursday June 25, 2026 @12:57PM (#48676212)
Because you can deduplicate certain parts of the logic which make the whole thing less error prone, such as

    if c
      x=1
    else
      x=2
If I ever want to change x, or refactor this code some other way, its a more brittle process over x=c?1:2

The ternary expression also takes up much less space so there is less of an emphasis on it, this can be a stylistic tool in a programmer's toolbox

Re:LuaJIT 3.0 proposed syntax extensions by lucas_t_a on Friday June 26, 2026 @04:31AM (#48683969)
the oposite is also true, you can have misleading side effects coming from joining things into a single expression