-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Understand what the problem with IsIterator might be #40
Comments
Defining |
We should be able to make If you want to make a PR, inference would just need a new tfunc (following the examples at |
Is that essentially the following story? If I call
I won't be able to make that PR, that is beyond my understanding of julia. But would we gain anything from that? From my tests it seems that the |
It'll make interactive development harder (which is basically all what #265 is about, I'm not aware of any cases in package code that's directly affected by #265). The gain would be making this code not break in the future. Arguing that something "seems" to work and "doesn't suffer from the problems" is basically what causing the other issue in the first place. I don't think there's immediate plan to make changes that breaks this but it's not impossible. |
Which answer would you like to hear? Like in #39, you are depending on the compiler not being able to notice.
nah, that's much too simplistic. The issue is that future calls will probably be non-deterministic between returning |
So I guess the best resolution for this issue would be to find someone who can make the changes to base that @vtjnash suggested, and then just change the SimpleTraits.trait{X}(::Type{IsIterator{X}}) = method_exists(start, Tuple{X}) ? IsIterator{X} : Not{IsIterator{X}} My understanding from the comments above is that this would essentially solve the problem? I actually don't understand why, but I trust that @vtjnash has a better grasp of these things than I do ;) The other question is what we do until someone has made these changes to julia... In terms of timeline, @vtjnash do you see any change of this making it into julia 0.6? I hear your dire warnings about non-deterministic behaviors and aborts etc., but then I have used this trait every day for two months now and not once has any of that happened. So either I was really, really lucky, or maybe this is more something you expect to stop working in the future? For my own use of this, we could move away from the generated function right now already. My use-case is not really performance critical, so if this leads to what @mauro3 calls dynamic dispatch until we have the changes in julia, I could live with that. |
@vtjnash #40 (comment) is excellent news. I might have a go at this, but unlikely before May, and likely needing a lot of help. There is a tfunc addition for |
Aside, here all the related issues: - #39 - #40 - JuliaLang/julia#21356
Aside, here all the related issues: - #39 - #40 - JuliaLang/julia#21356
Aside, here all the related issues: - #39 - #40 - JuliaLang/julia#21356
I tried to follow this discussion and the discussion over at #39 and I'm currently out of my depth. Is this issue still an issue? And is it fine to get around the issue by explicitly/manually defining a type to have the trait
and just make sure that I do that only if there's also |
Yep, I should really remove the generated function for Anyone against runtime dispatch for |
There are not going to be more answers... |
@yuyichao made this comment in a different issue:
I don't understand that comment, can you please elaborate, @yuyichao?
The text was updated successfully, but these errors were encountered: