-
Notifications
You must be signed in to change notification settings - Fork 1
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
Proposal: replace Indeterminate() with Base.missing #16
Comments
An alternative would be extending:
That would, in most cases, allow Base methods to promote |
Oh, and of course this proposal would break the exception catching concept (for TypeError). Although it might be ok to treat missing information more generally rather than specializing for missing data due to interval arithmetic? |
Hmm, I have to admit I'm unsure about this myself. Using |
I would say it is missing information: we simply don't know which two numbers we are comparing (for example). And Base documentation suggests that missing was added explicitly to implement three valued logic. Consider for example |
And as long as we don't add methods to Missing, it's not type piracy |
Sure - but then, you did get kind of positive replies to you suggestion to make |
True, I think there are three methods we could implement without type piracy
the only one that would be problematic imho, is |
True. Alas, How about using a specialized type like |
I'm not sure intervals are even the right result for that operation. The set of solutions isnt the interval |
Hm, yes. Ok, assuming we'll go with |
Yes, I think that would make sense in a I guess in the future one could also propose a generalized "set arithmetic" which is able to compose arbitrary sets of numbers, not just intervals. Then, taking in two sets of single numbers, {a} and {b}, one could reasonably return their union {a, b} (without any type piracy). It's beyond the scope here, but I think it's worth considering for a future package… |
Yes, I agree. |
Ok, so I think I will move forward with #17 . Would you like to add |
Good idea - done. |
ok, thanks |
I feel like we're reinventing the wheel in indetermiate.jl; and it is leading to some method creep. There is a lot of support in Base for three-value logic, especially in Boolean array methods, like
all()
orany()
. Keeping a custom three-value logic means reimplementing all those functions.On the other hand, the only reason for using a custom type instead of
Base.missing
(as far as I can tell) is that it would allow something like(assuming a<b). With
Base.missing
that would be type-piracy.Since extending
ifelse()
is currently off the table anyway, I think we should switch toBase.missing
as soon as possible. Am I missing something, @oschulz? (No pun intended.)The text was updated successfully, but these errors were encountered: