Skip to content

Keyword descriptions of let-bang and friends should be consistent and not specifically refer to asyncs #5343

Closed

Description

@jwosty

As discussed in #4427 (review)

Some computation-expression keyword descriptions are inconsistent with each other in how they are described, and this should be fixed. For example:

  • let! says it's "Used in asynchronous workflows ..."
  • use! says it's "Used ... in asynchronous workflows and computation expressions ..."
  • return! says it's "Used to indicate a computation expression ..."
  • yield! says it's "Used in a computation expression ..."
  • and finally, match! says it's "Used in computation expressions ..."

All of these descriptions should be unified to either all say "Used in computation expressions", or "Used in a computation expression" (doesn't really matter which; just as long as they're consistent).

Activity

  1. cartermp commented on Jul 16, 2018

    @cartermp
    Contributor

    100% agree, it should be unified on CEs.

  2. jwosty commented on Jul 16, 2018

    @jwosty
    ContributorAuthor

    I can certainly take this one within the next couple of days

  3. added this to the 16.0 milestone on Jul 16, 2018
  4. chillitom commented on Jul 18, 2018

    @chillitom
    Contributor

    It would be really cool if there was a way to document computation expression builder methods so that intellisense and compiler warnings would adapt for the context of the builder.

    For example let! in an async builder might say "binds the result of an async computation" whilst let! in a maybe builder might say "binds the value of the option when Some otherwise causes the maybe computation expression to result in None". (Preferably with better wording).

    Perhaps it could just pick up any doc comments from the associated builder methods if they exist.

  5. jwosty commented on Jul 18, 2018

    @jwosty
    ContributorAuthor

    @chillitom now that's a thought that's worth exploring. I wonder if that's possible -- it would depend on what phase of the compiler in which the keyword descriptions are read. The helper function that does that is keywordsWithDescription, and it's used by a few other things, so maybe it should be able to get this information dynamically from user code.

    Assuming this is possible, should it just take the comment from the associated builder method if it exists and use that as the description?

  6. modified the milestones: 16.0, Unknown on Aug 25, 2018
  7. modified the milestones: Unknown, 16.0 on Sep 20, 2018
  8. cartermp commented on Sep 20, 2018

    @cartermp
    Contributor

    This is now completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions