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
"Equivalent to return foo();" vs. "Equivalent to foo()". #679
Comments
The returns which were removed in that commit were added back in 0586a06 after some discussion with library folks and Richard. As it turns out, you can either describe the return value via a 'return' there in the Effects:, or in a Returns: clause. It seems to be up to the library authors as to which method they prefer to use. That said, the inconsistency bothers me too - I found it to be confusing. I don't know if you want to close this now, given that the inconsistency appears to be intended? I did ask the library folks to go through the spec and make sure the returns/Returns are how they want them to be, as part of a related issue. One thing I'd like to change is to add a : after the Equivalent to: when it is followed by a code block - I think that would help to at least know when we are introducing a code block, but no one has replied to me on that. |
I think there's a distinction: "Effects: Equivalent to |
Note that "Equivalent to" has special meaning; see 17.4.1.4p4. |
I don't think there's anything to be done for this issue that wouldn't be covered by #1119. |
Outside of this commit, it looks like most uses of the magic words "equivalent to" for a value-returning function is of the form
or
That commit stripped a bunch of
return
s from "equivalent to"s of the first form, so that it's insteadThe inconsistency seems...odd.
The text was updated successfully, but these errors were encountered: