-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add a section about code documentation/comments #40
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
Comments
Not sure we want a whole chapter on comments. (But I can be persuaded)
We could introduce them properly in the "Hello World" chapter.
This will be covered in the rustdoc chapter (which is already in the wishlist)
Maybe this can be part of the rustdoc chapter. |
In my opinion, sections of the "Foo by example" format should be much smaller than chapters in a tutorial or a book. This format exists because it allows to look up features when needed (either while programming Rust, or when you want to compare Rust features with your favorite programming language). Most tutorials do not have a whole "chapter" on HelloWorld,
That would be a pitty, because it is not related to rustdoc at all. What is a better place to make people discover that Rust's comment blocks can be nested (which IMO is an awesome feature for disabling/reenabling code)? |
Sorry for my lack of excitement about nested block comments, that's caused by the fact that have not used However, how I use comments should not impede others from learning that rust has nested block comments. So let's add a chapter on comments (I'll queue it in the wishlist right now). But, I would like to see a useful example about nesting comments (not just some |
Well, i'm not excited either, but Rust people removed it first and then missed it and put it back. It's useful when you want to temporarily disable disabled stuff:
will be
Many tools like Eclipse JDT will do this instead:
which makes it hard to re-enable the block as it was. |
Mention:
//
/* */
. It seems, they can be nested: https://mail.mozilla.org/pipermail/rust-dev/2014-April/009709.html///
,/** */
: https://github.com/mozilla/rust/wiki/Doc-using-rustdocThe text was updated successfully, but these errors were encountered: