Skip to content

Change documentation style requirement to /++ +/.#2133

Closed
jmdavis wants to merge 1 commit intodlang:masterfrom
jmdavis:dstyle
Closed

Change documentation style requirement to /++ +/.#2133
jmdavis wants to merge 1 commit intodlang:masterfrom
jmdavis:dstyle

Conversation

@jmdavis
Copy link
Member

@jmdavis jmdavis commented Jan 27, 2018

If we're going to require either /++ +/ or /** */, /++ +/ makes more
sense, because it allows for comments to be put into the documentation
if need be, whereas /** */ does not, because it doesn't allow comments to
nest. And while comments would usually be in code examples inside a
documented unit test, sometimes we still need to put code examples
directly in the documentation.

I'm all for disallowing stars or pluses on the beginning of documentation lines (they're really annoying IMHO), but if we're going to require /++ +/ or /** */, I very much would prefer /++ +/, and as the commit message points out, /++ +/ is objectively better. In most cases, it doesn't matter, and it's personal preference, but in some cases, it really does matter, and in those cases, /++ +/ works well, whereas /** */ does not. I don't see any advantage to requiring /** */.

If we're going to require either /++ +/ or /** */, /++ +/ makes more
sense, because it allows for comments to be put into the documentation
if need be, whereas /** */ does not, because it doesn't allow comments
to nest. And while comments would usually be in code examples inside a
documented unit test, sometimes we still need to put code examples
directly in the documentation.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @jmdavis!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@jmdavis
Copy link
Member Author

jmdavis commented Jan 27, 2018

Closing in favor of #2134.

@jmdavis jmdavis closed this Jan 27, 2018
@jmdavis jmdavis deleted the dstyle branch February 3, 2018 17:25
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.

2 participants