Skip to content

Six forms of doc comments are five too many #6782

Closed
@bstrie

Description

@bstrie

Currently we have six forms of doc comments:

  • outer line ///
  • outer block /** */
  • inner line //!
  • inner block /*! */
  • outer attribute #[doc=""]
  • inner attribute #[doc="";]

Ideally this would be reduced to one, but if two are necessary then that's fine. It's perfectly acceptable to not cater to every miniscule style convention. Here is my proposal:

  1. Remove the direct attribute forms, since their unwieldiness was why we introduced the comment syntax in the first place. This reduces to four.
  2. Select either line or block, and remove the other. This reduces to two.
  3. Remove the inner form if possible. If we can find some special way to document modules without requiring a special syntax just for that, then so much the better.

Alternatively, we could conclude that it's simply too much trouble to have special forms for doc comments and just stick with the attribute forms. This would be somewhat uglier, but more consistent with the rest of the language

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions