2 ms·
Why could you not write: z + -3.0 and A * 4.0 ?
by galaxyLogic 6y ago
Why could you not write:
z + -3.0
and
A * 4.0 ?
- xscott 6y agoYeah, you could do that in some cases. You could also just call functions and not have operator overloading at all. However, it's not hard to construct a case where instead of using literal values they are arguments to a function (or elements in a list), and you don't know which type comes first until runtime. But really, if you're translating math from an equation (say in a book or something), juggling the order of the binary operators is gross.