Closed vvagaytsev closed 8 months ago
Currently, the library silently considers a range as an empty one if the range's start is greater or equal than its end.
A couple of questions/ideas:
Would it make sense to use closed ranges (i.e. with inclusive end)?
If yes, then the range of [1, 1]
would return a singleton array [1]
instead of an empty one. That might be more intuitive and expected.
Should reverse ranges be supported as well?
Would it make sense to use closed ranges (i.e. with inclusive end)?
Sure ๐๐ผ While it is a slight behavior change, i think it would be harmless to have as a fix. Do you mind to include it in same PR as a fix? ๐๐ผ
Should reverse ranges be supported as well?
It is little necessary complexity in implementation IMO. Any specific reason to do it?
Would it make sense to use closed ranges (i.e. with inclusive end)?
Sure ๐๐ผ While it is a slight behavior change, i think it would be harmless to have as a fix. Do you mind to include it in same PR as a fix? ๐๐ผ
Sure! I'll update the PR soon.
Should reverse ranges be supported as well?
It is little necessary complexity in implementation IMO. Any specific reason to do it?
No, there is no specific reason for doing that :) A reverse-ordered array can easily be created in the code and passed as a ports
parameter's value if necessary.
@pi0 I made the fix in 6255565ed093175c3cfd2292f4959549cb604f24, please take a look :)
Hi @pi0! What would be the next steps to get this merged? There is one workflow awaiting approval from a maintainer. Could you help me with that, please? Thank you! :)
๐ Linked issue
None.
โ Type of change
๐ Description
README.md
._generateRange
internal helpers.๐ Checklist