-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add docs for Int#downto
#12468
Add docs for Int#downto
#12468
Conversation
Could you leave the parameter renaming out of this PR and just add the docs for now? I think that change might need some more discussion first. |
You can probably make |
The last commit doesn't touch the code but I think it highlights why I feel the name change is better. Compare this:
with this: Get an iterator for counting down from self to limitRead it out loud and it's really obvious (to my ear).
Method arguments gives the 2nd reason for using named parameters as…
but I'm more concerned with how the documentation reads, I'd rather that From the issue
Perhaps I'm bikeshedding but my view is that code can be made to sound more like English but will always hit a limit somewhere and read like code (that's why it's called code, after all) but the documentation is English and thus any possibility to make it flow better is a win.
Agreed. How about we keep this docs only, I'll push up docs only for I just noticed that trailing semicolon, I'll fix that now too. |
But giving different external and internal parameter names doesn't imply that the docs must use the former. For instance,
|
I would always prefer renaming local vars over changing an API (changing a message signature). The scope of the instance vars is limited by being part of a very short interface, so it's also not a dangerous change IMO. I now see that the current naming convention extends throughout the file and I'm getting confused with my own "fixup" commits so I'll stick to add the docs only and leave the code for another day. |
downto
, updated arg name for style reasons. #12467Int#downto
…stal-lang#12467 Update the iterator's related var name for consistency. Did this because it only had bare signature for docs, and the `to` argument reads badly.
Co-authored-by: Johannes Müller <[email protected]>
Co-authored-by: Johannes Müller <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @yb66 👍
Update the iterator's related var name for consistency.
Did this because it only had bare signature for docs, and the
to
argument reads badly.