News for hackers. Stuff that matters.
Re:Why Python doesn't need blocks by ianbicking on Monday June 30, 2014 @12:51PM (#7966067)
This article doesn't seem to address continue, return, and break. These are control-flow features that are often allowed in blocks (though not all languages) that can't be done in a function. That is, in a block "return" will return from the enclosing function, and continue/break are a sort of signal to code calling the block. You can simulate the second, like jQuery.each(function (item) {if (timeToStop) return false}); but I don't know of good conventions for this so typically the functionality is skipped. But it's demonstrably useful functionality because it is so widely present in languages.

There are no comments on this comment yet.