4 ms·
You left out the more common options: (1 + x * 2 - 3) % x and (1 + (x * 2) - 3) % x both are clearer than the S-expression in my opinion
by sbergot 3y ago
You left out the more common options:
(1 + x * 2 - 3) % x
and
(1 + (x * 2) - 3) % x
both are clearer than the S-expression in my opinion
- Paul-Craft 3y agoI agree, and this is why for math expressions that aren't just composition of functions that aren't basic operators, I like to use a macro that lets me type them in as infix. It's the one case where lispy syntax just doesn't work well, IMO.
- zelphirkalt 3y agoI don't find them to be clearer, with the background of knowing many language, because now I have to worry about precedence and I better double check, to not get it wrong or read it wrong.