-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add comments for html5ever/examples #506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could see us adding comments on particularly tricky parts of the code and maybe succinct descriptions of what the examples do, but I don't think we need comments of the type:
// Create a new arena
let arena = typed_arena::Arena::new();
which simply repeat what the code itself is saying. In general, clearer code and better variables names are preferred to comments for me.
Quick question though: Were these comments generated with a large language model like ChatGPT? I don't think we want AI generated code or comments at the moment. Thanks for understanding.
Hi Martin thx for the comment. I've removed some comments which just repeat simple code (like the arena example) There's no doubt that good naming and self-explanatory code are much better than comments. Though in the case of code example, comments can make the newbie developers' life easier. I wanted to step into this project in order to contribute it in some way, and the And no, non of these comments were generated by any kind of LLM, as I mentioned before I'm interested to help develop this project so I wanted to actually learn how it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification and the contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a useful improvement to me.
@organic1337 this needs rebasing past #520 if you're still interested in working on it. |
d6e184c
to
80121b9
Compare
My first PR here :)
I decided I wanted to contribute to this cool project, and when I started learning about it, I headed over to the examples directory, and it was quite hard for me to understand what I was reading because it lacked some comments.
Someone already opened an issue about it.
Changes
arena.rs
example to the end of the file (to match the other examples)