crystal
crystal copied to clipboard
Adding docs for Integer#downto
I've a small pull request to put in that adds some docs to downto
as missing docs bother me, even for "obvious" stuff. It also renames the variable to
to limit
a là Ruby, because downto(limit)
reads better than downto(to)
, especially for writing documentation. I've matched that up in the DowntoIterator for consistency.
As an aside, none of the issue templates really seemed appropriate for this, any chance of one for documentation? (or something like "other")
Regards, iain
PS Yes, I meant Int
not Integer
Sounds good.
Adding documentation is always welcome and doesn't necessarily require writing an issue about it first. If there's something that's up for discussion, I think the language improvement discussion choice is good. Same for changing the API, it's a language improvement discussion.
I'll keep it in mind, thanks. I'll draft a template for documentation issues when I can, hopefully remove a little bit of friction, docs are always a good one for newcomers to have a go at :)
Regards, iain
I'm not sure about changing to
to limit
. It's not a huge improvement, so the question stands whether it's worth it. We'd have to support to
as a named argument as well for backwards compatibility.
This should also be discussed together with Int#upto
which has the same parameter name. In Ruby, both parameters are called limit
, in Crystal, both are called to
. They should definitely match up.