-
Notifications
You must be signed in to change notification settings - Fork 70
Support for callable object on 0.4-dev #216
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
Comments
I think it should be possible to remove the ::Function typing so, I'll have a go making this change Sent from my iPad
|
That will be nice. I had a look at it myself and found some cases that would probably need careful handling. Examples including this and when extending |
The first example isn’t too important since the timeevolution routines aren’t really meant for general use, they are just a hack to do movies of time evolution PDEs. The second case should be left as it is because it is just to allow
to work, where ∇ is defined as a function a few lines above.
|
I've made this change in development branch, but bizarrely it makes the compile time huge. I'm not sure how that could be. |
I reverted LowRankFun/ProductFun to fix the compile time issue. I think we can close this as those aren't really meant for general use |
The specific issue of supporting new DFT API should be fixed by #218, which should still remain compatibility with the old API. I'm not sure what's the plan for ApproxFun and callable objects so please feel free to close this if you think it's good for now. P.S. for allowing sth like |
Merged! |
When trying to see how would the new DFT API affect packages, I find ApproxFun as the single user of the FFTW plan api among registered packages JuliaLang/julia#12087 (comment).
Since the API change makes the
plan_*
functions return an plan object rather than an anonymous function, this seems to break certain assumptions in ApproxFun and causing dispatching errors etc.As a more general issue, from what I can tell, ApproxFun make heavy use of the
Function
type and assume it is the only callable object. This would probably cause some trouble after 0.4 is released since people may try to pass in callable object and expect better efficiency but end up getting wierd errors.I'm bringing this issue up because I'd like to get ApproxFun ready before the breakage is merged (which I'd like to do in a few days) and would like to know if devs of ApproxFun have any plan for the more general issue (supporting callable object). (simply removing the
::Function
causes tones of ambiguity warnings.)If there's not a plan on the table yet, I would try to fix the breakage by wrapping the result in an anonymous function. (Since the old interface of calling the returned object is deprecated, a wrapper would always be necessary. However, this can be a callable object if ApproxFun supports it.) This would not be as effectient but shouldn't be worse that what it is right now.
The text was updated successfully, but these errors were encountered: