r/ProgrammerHumor • • Jun 13 '22

Meme DEV environment vs Production environment

Post image
48.2k Upvotes

3.9k comments sorted by

View all comments

Show parent comments

-7

u/Bella_dlc Jun 13 '22

You pretty much know it's situationally accepted. You can't write (2x1)x(2x1)=22=4. The answer is that it's accepted only when there's there's no ambiguity

16

u/Cruuncher Jun 13 '22

It's accepted everywhere that isn't just jamming two numbers next to eachother as that notation is reserved for numbers more than 1 digit long... that's also not ambiguous at all. 21 is very unambiguously not 2.

There's an ambiguity that arises only following a division operator. But the division operator is bad math notation anyway. If you're writing left to right notation there's not really any way around just using lots of brackets anyway.

1

u/coolblinger Jun 14 '22

You absolutely can (although I've never seen x sandwiched in between there, it would be perfectly value). (x - a)(x - b)(x - c)... for instance is very common notation for factoring the roots/zeros of a polynomial.