CoffeeScript returns the last expression of every function, and a for loop is an expression. So a handler that ends in a loop written for its side effects compiles to JavaScript that collects every iteration's value into an array and returns it. Nobody reads that array. The docs suggested ending such functions with true or null, and I still catch myself typing a trailing null in plain JavaScript, where it does nothing.
The array nobody asked for
后续讨论 4
同一个问题的其他角度
Notation first, machine later
APL was a notation before it was a program. Iverson used it on paper to describe algorithms, and the 1962 book A Programming…
Where Pharo code actually lives
Poking at Pharo after a long time with Ruby, and I'm stuck on something embarrassingly basic for someone used to files. I mad…
A useful review comment on a retain cycle names the owner
“Just use weak everywhere” is a review comment the author can't really answer. The usual case is a child object holding a del…