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

Algorithms should specify their return type in more cases. #581

Merged
merged 1 commit into from
May 31, 2023

Conversation

jyasskin
Copy link
Member

@jyasskin jyasskin commented May 25, 2023

It's wrong to assert that return types are always easy to infer from
algorithm steps and call sites. We also shouldn't make people read
through the call sites (which might be in other documents) to figure out
what an algorithm returns.


Preview | Diff

It's wrong to assert that return types are always easy to infer from
algorithm steps and call sites. We also shouldn't make people read
through the call sites (which might be in other documents) to figure out
what an algorithm returns.
for algorithms that do return a value, since the return type is relatively easy to infer from the
algorithm steps and call sites:
for algorithms that do return a value if the return type is relatively easy to infer from the
algorithm steps:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comma still seems good? Not entirely sure, but it's a pretty long sentence otherwise.

I was also thinking that we could say "nearby callers", but if you have to look at callers at all it's probably best clarified anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the comma because before it was ok to skip the second half of the sentence, but now it's not ok. But I don't care very much. :)

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domenic did you have a chance to look at this?

@annevk annevk merged commit dbc268d into whatwg:main May 31, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants