3 ms·
I remember having this question when learning J, and they pointed out that it makes the = operator behave correctly. After: a = 1 + 2 One expects `a` to e
by fiddlerwoaroof 3y ago
I remember having this question when learning J, and they pointed out that it makes the = operator behave correctly. After:
a = 1 + 2
One expects `a` to equal 3. If you have a uniform left to right evaluation order, it will equal 1 and then the whole expression will be set to 3, so you’d need to write this to get the intuitive result:
a = (1 + 2)