-
Notifications
You must be signed in to change notification settings - Fork 13
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
Possible name of renaming #45
Comments
Please, no. It's like moving |
Interesting point, let me consider this |
Why would it need "iterator" in the name? |
So I have heard a point (maybe from @hax) that most of the built-in methods that return an iterator are not configurable via option bags. But this one is different. (Oh so |
I also don't know why an options bag would make a difference, unless you're suggesting that an option would be able to change the return type of the function, which I'd find very confusing and problematic. |
Another difference is keys/values/entries/matchAll are prototype methods and range is not. 🤔 |
Why would the placement of a method create confusion about the return type? |
Hmm, that makes sense to me. I need to consider more about this. Let me close this for now. Another question. Are people here (and in #42) are good with the status quo? |
I don't think any modern languages put the types in method names 😬 |
So per discussion in #42 I think most people do not comfortable with class. I'm not OK to ship Number.range without hinting it is an iterator in the name so I'm going to rename this proposal.
Requirements:
Example:
Number.rangeIterator
orIterator.numericRange
(unify all kinds of numbers, bigints, ...etc) orIterator.numberIterator
+Iterator.bigintIterator
.Number.range
To avoid the embarrassment if we want to add things like String ranges, Temporal ranges (maybe we do have it?), or other kinds of ranges, the name must include
number
,bigint
ornumeric
(if merge number and bigint into one API).Iterator.numericRange
Iterator.range
=======================================
Though I strongly want to hint at both "iterator", "range", and "number" in the API name, I'm worrying if it will hurt the egenomics because the name is too long. Maybe it is not a problem because all modern IDEs and debuggers will provide completion for the API so it is not a problem? I don't know.
The text was updated successfully, but these errors were encountered: