logoalt Hacker News

gingerBilllast Wednesday at 9:07 AM0 repliesview on HN

The code example is more to show the scoped copy-on-write behaviour of `context` more than how it is used in practice. I agree it might be a bit confusing and thus needs to be made clearer that is what the code example is meant to show. However, I don't there is any code example that could show "correct usage" of `context` without it defeating the point of it. As I say in the article, it makes more sense to leave it "confusing" because then people will ignore it.

The Overview is just that, an "Overview" and it's not meant be either a spec, a heavily detailed tutorial, nor an explanation of why a language construct is designed the way it is and/or why it exists. The latter of which would probably be as long as the Overview for each construct that exists if that.