by dwc · 14y ago · 0 comments
All the examples of various languages providing this for open files also kind of misses it. The point is not whether a particular language supports this for open files, but whether people recognize the idiom and the language supports doing this yourself wherever it fits. For a pattern this incredibly common it's a point well worth making.
For what it's worth, I think most commonly used languages can implement some form of the context function in my example.