@snarfmason @mattly I will always have a place in my heart for Smalltalk's approach due to its sheer idgaf attitude but I do have to admit this is the better solution overall
Top-level
@snarfmason @mattly I will always have a place in my heart for Smalltalk's approach due to its sheer idgaf attitude but I do have to admit this is the better solution overall 11 comments
@snarfmason @technomancy part of this as someone who gets real caremad about things like cognitive load and mistake-proofing, while I can appreciate smalltalk’s approach in ignoring operator precedence, I can also see it biting people who aren’t throughly testing their stuff for unexpected errors & I don’t view “you should have known better” or “you should have written better tests” as acceptable rejoinders to language design that violates established conventions, even bad ones @snarfmason @technomancy that said, I think that if any language can pull off something like ignoring operator precedence and just doing LTR operations, it’s smalltalk, because the audience self-selects to the sort of people who can maintain that cognitive load @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. @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. @snarfmason @technomancy which brings us back to lisp, where you just nest the expressions! :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D @snarfmason @technomancy no I know, I mean, there’s not *really* a right answer there, but if there’s anything I’ve learned in over a decade of figuring out how to mistake-proof semantics, is that it’s better to fail / throw errors / prevent obviously stupid things from happening (the way pony does) than to ship obvious footguns @snarfmason @technomancy I once had to build alternate number types into a schema to represent statistical averages to prevent people from adding them, because people were taking multiple averaging results and averaging *those* & making decision based off this people do stupid things like this all the time, yet we still have yet to really evolve our concept of numbers in computers to do things like making dividing by zero impossible by having dividend / divisor types |
@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.