At least for a newcomer (like me) to Nim, the sudden introduction of the discard statement as early as https://nim-lang.org/docs/tut1.html#lexical-elements-comments was jarring. I did click on the link and it turned out to be a discussion on procedures and silently throwing away return values.
This, in my opinion, is both unnecessary and confusing. Since at the very start of the tutorials we don't know that triple quotes are procs that return values (at least that's what I gather from the discussion), that diversion increases the overall effort the reader must apply in order to understand something as simple as comments.
If indeed the triple quotes are procs with return values, we should simplify the explanation to say so.
The discard-triple-quote way of doing comments was the "old way" of doing block comments in Nim. Since multi-line comments have been in Nim (i.e. #[ and #]) since 2016, IMO the old way should not be encouraged for beginners.
@awr1 Thanks for your response! So, can we ask someone to fix this? Or maybe I can send a pull request (but it will probably get ignored)? :sweat_smile:
We don't ignore pull requests, but we are sometimes slow to review them, sorry!
@Araq Hey, that's not what I meant! :smile: I've not even sent a single pull request to Nim yet. I've actually tried to contribute docs changes to some other new languages (I'm a sucker for new languages) and was met with stone stares by the creators. They thought they had explained it well enough, that the theme chosen didn't need improvement, etc., etc. Anyway, I think I'll start sending pull requests to Nim and see how it goes. :+1:
I'll start sending pull requests
Yes please do, mentioning discard at that place is really too early and has no real benefit for the reader at this point.
Most helpful comment
Yes please do, mentioning discard at that place is really too early and has no real benefit for the reader at this point.