Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

confusing wording of "tail position" description #281

Open
edegeltje opened this issue Feb 3, 2025 · 1 comment
Open

confusing wording of "tail position" description #281

edegeltje opened this issue Feb 3, 2025 · 1 comment

Comments

@edegeltje
Copy link

edegeltje commented Feb 3, 2025

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.

@david-christiansen
Copy link
Collaborator

Thank you, this is very helpful! I'm knee-deep in the coercion chapter but will resolve this soon.

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

No branches or pull requests

2 participants