@technomancy @mattly well as a fellow Smalltalk lover, I can't fault you there. And frankly just evaluate left to right is still better then trying to remember binary operator precedence.
Conversation
Notices
-
Embed this notice
Jon (Snarf) Mason (snarfmason@hachyderm.io)'s status on Wednesday, 05-Jun-2024 06:54:56 JST Jon (Snarf) Mason -
Embed this notice
Jon (Snarf) Mason (snarfmason@hachyderm.io)'s status on Wednesday, 05-Jun-2024 07:11:50 JST Jon (Snarf) Mason @mattly @technomancy I agree with the principal. But I honestly don't know which way is better.
There are established conventions for the math operators yes. But those aren't the only binary operators in most programming languages.
What the fuck does order X + Y & Z apply in? (PS: fuck Ruby and whoever else though &&/and have different binding priorities was a good idea).
Once you move past the rules we learned for arithmetic, "go left to right for everything" actually is better, I think.
-
Embed this notice
Jon (Snarf) Mason (snarfmason@hachyderm.io)'s status on Wednesday, 05-Jun-2024 07:15:09 JST Jon (Snarf) Mason @mattly @technomancy I agree with you about trying to design languages to make it harder to make mistakes though and that's why I like the Pony approach.
I'm honestly not sure any way of assigning precedence of binary operators is good.
-
Embed this notice
Jon (Snarf) Mason (snarfmason@hachyderm.io)'s status on Wednesday, 05-Jun-2024 07:17:34 JST Jon (Snarf) Mason @mattly @technomancy well I'm not saying LISP isn't best.
-
Embed this notice