Comment on I dunno
mindbleach@sh.itjust.works 2 days agoPersonally I tend to bracket aggressively, because I’ve been repeatedly betrayed by compilers. One in particular applied the high priority of & (bitwise and) to the low-priority && (logical and), so if( 1 < 2 && 3 ) would always fail because 2 && 3 evaluates to 1.
That was the topic the first time I dealt with this dingus and their rules of maths!!! about a year ago. The post was several months old. They’ve never understood that some things are fundamental… and some things are made up. Some things are mutable. So even if their nonsense was widespread, we could say, that’s kinda stupid, we should do something else.
The dumbest argument I’ve ever suffered online was some dingdong convinced that “two times three” meant the quantity two, three times. Even though “two times” is right there, in the sentence. Even though “twice three” literally means “two times three.” Even though the song “Three Times A Lady” obviously does not mean the quantity three, ladyce. Not even that dipshit thought two times three-squared could be thirty-six.
FishFace@piefed.social 2 days ago
Yeah, I’d make most stuff explicit in programming. You’re rarely gonna do more than two arithmetic operations at a time anyways so you often get it for free. The most common one for me is % which I expect to bind weakly. I guess it binds tightly because it follows division, but I read “a + 1 % n” out loud with a “modulo” and when you say that in a mathematical context the modulo would apply to the entire expression to the left.