Seems totally pointless to throw his own community under the bus with the initial paragraph. The first paragraph serves no purpose other than illuminate that ginger bill didn't want to write this, and is only writing it because we are too stupid to read his documentation.
There is sadly a habit which is not bound to any "community", and I've seen a lot of cases where people will just rant a lot about something they don't understand when that rant could have been easily prevented by either reading the documentation/manual or asking someone in the first place. In the case of Odin, this is usually reading the Overview, the FAQ, or even just asking a question politely on the Discord/Forum/email. The implicit `context` system is one of those specific cases which is more likely to bring up an "uninformed rant". A lot of people seem to think you can figure everything out without reading a manual or rely on the veracity of what an LLM produces, and sadly this is not going to work for a lot of things in life. Most of the cases for explaining the existence of `context` (the thing the rant usually happens about) is usually solved by copying and pasting the two paragraphs from the Overview, explaining that it is for third-party interception. Sometimes it requires a longer explanation and thus I resorted to writing this article.
I don't like writing articles in general, since I am not a very good writer either, which is why I didn't want to write it; not because of the topic in itself. I could rephrase that first sentence/paragraph to not sound as "harsh" but when working on an open project, I would like people to at least read some form of documentation or just ask a question directly before they complain/rant.
The linked documentation in the first paragraph is confusing. It sets things in `context`, then calls `supertramp()`, which doesn't even use `context.user_index` or `my_custom_allocator()` specifically, which is not defined in the example?
Are we to assume that `new()` somehow makes use of `context.allocator` and `context.user_index`? It goes on to explain that new(x) is also `new(x, context.allocator)`, but never explains the relevance of `context.user_index`
No wonder people "misunderstand"
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.
The implicit idea is that new will always use a context allocator to create the thing. Not its own allocator that you cannot control. But yes that does not seem obvious to the guy trying to learn the language.
I don't like writing articles in general, since I am not a very good writer either, which is why I didn't want to write it; not because of the topic in itself. I could rephrase that first sentence/paragraph to not sound as "harsh" but when working on an open project, I would like people to at least read some form of documentation or just ask a question directly before they complain/rant.
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.