Skip to content
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

Should there be an AbstractFunction? #13877

Closed
SloanLindsey opened this issue Nov 4, 2015 · 2 comments
Closed

Should there be an AbstractFunction? #13877

SloanLindsey opened this issue Nov 4, 2015 · 2 comments

Comments

@SloanLindsey
Copy link

I've recently been experimenting with the FastAnonymous macro in v0.4. I find it useful to create custom functions with the constants baked in and then stuff these functions into a dictionary.
When one defines the receiving dictionary to be of

Dict{Int64,Function}()

and then tries to add a duck type function from FastAnonymous one gets the expected conversion error.
Clearly the work around is to define:

Dict{Int64,Any}()

and let everything just work out.

The experience does make me think that it might be desirable to have an AbstractFunction supertype which is referenced by FastAnonymous.
I'd like to hear other people's thoughts.

@JeffBezanson
Copy link
Member

You will love #13412. On that branch, Function is now an abstract type (plus FastAnonymous is no longer needed).

@SloanLindsey
Copy link
Author

Lovely! I guess I can close this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants