You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, this is a cool and useful library
What do you think about supporting symbol syntax? i.e <16 means "less than 16". This lets you have intersecting ranges: (>1.8 < 16): greater than 8 less than 16
pros: more aesthetic than strings. range intersection
cons: people will get confused by directions.
Cheers
The text was updated successfully, but these errors were encountered:
Interesting idea. It's true that in the current implementation, you can't express such a range in isolation (you would also need to add a 16+ range). At the same time, I'm having a hard time imagining a scenario where you would need to define a behavior for, say 9 through 16 but not for any other (which would presumably result in IllegalArgumentException if run on 16 or higher).
I can think of a situation:
Let's imagine some new API was added in java 11, and in Java 17 another API with better performance is available, too. Then I'd want to use the former for 11-16, and the latter for >17.
It is a slightly perverse scenario, but theoretically possible.
Yeah, so in that case you can use 11+ and 17+ under the current implementation. But I'm still open to consider your proposed syntax if people find that clearer, of course.
Hello, this is a cool and useful library
What do you think about supporting symbol syntax? i.e
<16
means "less than 16". This lets you have intersecting ranges:(>1.8 < 16)
: greater than 8 less than 16pros: more aesthetic than strings. range intersection
cons: people will get confused by directions.
Cheers
The text was updated successfully, but these errors were encountered: