-
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
Avoid extending Base.isopen #100
base: master
Are you sure you want to change the base?
Conversation
The `isopen` function defined here is very different and so it seems best we define a new function rather than extend `Base.isopen`. Doing this means we need to export `Intervals.isopen` to make this change non-breaking however doing this results in: ```julia WARNING: both Intervals and Base export "isopen"; uses of it in module Main must be qualified ERROR: UndefVarError: isopen not defined ``` It then seems best to not export `Intervals.isopen` and also then not export `Intervals.isclosed` to keep things consistent.
Alternative. Also we can deprecate |
Very true we are free to name these functions however we want. That said having both |
True, but on the other hand, |
Codecov Report
@@ Coverage Diff @@
## master #100 +/- ##
==========================================
+ Coverage 96.55% 96.64% +0.09%
==========================================
Files 7 7
Lines 261 328 +67
==========================================
+ Hits 252 317 +65
- Misses 9 11 +2
Continue to review full report at Codecov.
|
Another example where is_open(interval1) && issubset(interval1, interval2) Seems like an unnecessary inconsistency |
@oxinabox https://github.com/search?q=isopen+language%3Ajulia&type=Code Also |
in our intental codebase, we use But this also likely means that this change to Intervals to use a different |
The
isopen
function defined here is very different and so it seems best we define a new function rather than extendBase.isopen
. Doing this means we need to exportIntervals.isopen
to make this change non-breaking however doing this results in:It then seems best to not export
Intervals.isopen
and also then not exportIntervals.isclosed
to keep things consistent.As this change is breaking it should be included in the next major release and we can postpone merging this until we want to make a major release.