Skip to content
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

book: mention the existence of block comments in passing #28411

Closed

Conversation

zackmdavis
Copy link
Member

While the style guide does say to avoid block comments, they should perhaps be briefly mentioned in the "Comments" section of the book, to avoid leaving readers with the false belief that they don't exist.

r? @steveklabnik

While the style guide does say to avoid block
comments (https://doc.rust-lang.org/stable/style/style/comments.html#avoid-block-comments.),
some might argue that readers of the book should still be briefly
exposed to the fact that they exist, in order to avoid surprise or
confusion should one happen to encounter them, or perhaps to make it
easier to edit Rust code in an impoverished editing environment lacking
an appropriate comment-region command?
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@steveklabnik
Copy link
Member

I specifically left them out of the book, since they're not considered good style. They're in the reference, though.

Thanks, but this was deliberate.

@zackmdavis zackmdavis deleted the trpl_block_comment_mention branch September 15, 2015 14:16
@theduke
Copy link
Contributor

theduke commented Jan 28, 2016

I also think they should at least be mentioned in the docs, with the comment that they are considered bad style and should be avoided ( for whatever reason... ).

Block comments are really the only viable way to quickly comment out a block of code, if the editor/ide does not support other methods.

I was growing really frustrated by that, until I just tried '/* */'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants