-
Notifications
You must be signed in to change notification settings - Fork 18
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
Deprecate first
/last
in favor of lower
/upper
#90
Comments
I'll also note this is the terminology used by PostgreSQL's range functions: https://www.postgresql.org/docs/9.3/functions-range.html |
sure, seems fine to deprecate in fact, the docstring of help?> Base.first
first(coll)
Get the first element of an iterable collection.
|
a more verbose option could be arguably it is more consistent with Also, Another alternative would be to overload |
To stray further...the |
--
Also I would like my bikeshed to be blue please. |
thinking about this. For closed intervals, I would also say (that for closed intervals at least) I don't find |
As a new |
Overall I think i am in favour of Optionally, in future, we we could always add |
One other thing to mention here is there is also a type associated with the lower/upper endpoint which represents the type of bound used (closed/open/unbounded). The terms |
My own two cents:
I think the relationship to I think the overloading of |
Having taken a shot at this, I find that using @omus concern re
This also means the change would be breaking, without any space for deprecation, since So not only does it require a lot of carefully ordered find and replace calls within Intervals.jl, it would probably require the same or similar amount of effort for any callers of What if |
There's also |
Had an idea for how to make this a little disruptive than I initially thought, and have given that a try in #198. |
It can be rather annoying to read code with a
Vector{Interval}
as you can end up with things like:first(first(v))
which would be more readable aslower(first(v))
The text was updated successfully, but these errors were encountered: