Skip to content

confusing wording of "tail position" description #281

Open
@edegeltje

Description

@edegeltje

Describe the error

The wording describing what "tail position" means is confusing.

Quote

An expression is in tail position in the function body if it is:

  • the function body itself,

  • the branches of a match expression that is in tail position,

  • the branches of an if expression that is in tail position, and

  • the body of a let expression that is in tail position.

Why is it incorrect and/or confusing?

The wording starts out as "an expression is in tail position if it has one of the following properties", resulting in a disjunctive enumeration, while it ends in a conjunctive enumeration (as evidenced by the word "and" as well as the use of plural.)

I would suggest one of the following options:

option 1 (disjunctive list of conditions)

An expression is in tail position in the function body if it is:

  • the function body itself,

  • a branch of a match expression that is in tail position,

  • a branch of an if expression that is in tail position, or

  • the body of a let expression that is in tail position.

option 2 (conjunctive list of all options)

The following kinds of expression are in tail position:

  • the function body itself,

  • the branches of a match expression that is in tail position,

  • the branches of an if expression that is in tail position, and

  • the body of a let expression that is in tail position.

note that with option 2, "in the function body" is removed from the header of the list. I couldn't find a nice wording that keeps that bit, but as a result i'm not sure that the meaning is as clear and/or still correct. If i am the person writing the PR for this, i will want a second opinion (other than myself), as i am not a native speaker.

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