4 ms·
Most languages aren't LtR, either! For example, what's this in python? 2 + 2 * 4 / 1 + 1 In J, that's very obviously 6: as it's 2 + (2 * (4 / (1 + 1))). I
by hwayne 9y ago
Most languages aren't LtR, either! For example, what's this in python?
2 + 2 * 4 / 1 + 1
In J, that's very obviously 6: as it's 2 + (2 * (4 / (1 + 1))). In Python, it's 11, as there's order of operations to think about: 2 + (2 * 4 / 1) + 1. Strict LtR is not always preferable, but when you're pipelining a lot of tricky array operations it makes it a lot easier to understand the code.
- vforgione 9y agoFor simple arithmetic I find that extremely confusing. I also would have guessed that the equals was an assertion for the addition.