Skip to content

Use triple-slash comments for documentation #286

@sunfishcode

Description

@sunfishcode

I propose that the Wit format use /// comments, rather than //.

Wit itself no longer has non-documentation comments, however multiple projects are looking at using Wit as a base language that they can extend with more features. For such languages, it will be desirable to be able to have both documentation and regular comments, while remaining a superset of Wit.

Using /// for documentation and // for regular comments is a common convention, found in rustdoc, doxygen, C#, Swift, and others.

In the short term, the wit tooling can continue to accept both /// and // as documentation comments, until existing Wit files are migrated. In the long term, wit tooling could reject // comments to free up their space in the grammar for derived languages.

@peterhuene @lukewagner @esoterra

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