News for hackers. Stuff that matters.
Re:What does the ??!??! operator do in C? by mrguyorama on Thursday October 06, 2022 @11:56AM (#33109902)
I don't know what it is with C programmers and programming "terseness". It hasn't been the 60s since the 60s, and you have gobs of memory available, your source code can have syntactic sugar for the purpose of readability and the world won't end.
Re:What does the ??!??! operator do in C? by dahfizz on Thursday October 06, 2022 @12:54PM (#33110797)
Can you give an example of syntactic sugar in a modern language that makes order of operations a non-issue?
Re:What does the ??!??! operator do in C? by rdlw on Thursday October 06, 2022 @05:49PM (#33114533)
Parentheses
Re:What does the ??!??! operator do in C? by dahfizz on Thursday October 06, 2022 @05:55PM (#33114597)
Yeah, that's why I said

> Just use parentheses

Not sure what that has to do with memory usage..?

Re:What does the ??!??! operator do in C? by rdlw on Thursday October 06, 2022 @06:15PM (#33114815)
Just to clarify, I'm not the original person you replied to, and we all agree about using parentheses.

mrguyorama just implied that the only reason you would check the operator precedence chart would be to shave a few bytes off the size of your source code, which has not been a reasonable reason to do anything for many decades, and yet C programmers seem to like to do it anyway.

Re:What does the ??!??! operator do in C? by 1-more on Friday October 07, 2022 @01:18PM (#33124264)
These aren't syntactic sugar, but formatters. I rather like Ormolu for Haskell and elm-format for Elm. I occasionally type a bunch of parenthesis so that I'll for sure have the right order of operations. Then the format on save removes the redundant ones. It's delightful. The typecheckers and tendency to wrap primitives in a semantically significant constructor help with that.