-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Is Base.Callable
OK to use? Should it be documented?
#43491
Comments
Well everything could be |
As N5N3 suggested, this is not a common pattern. Since virtually any object can be made callable, there's no useful concept of a callable object at the type level. One could aim for a trait-like concept, but the preferred solution is to let the In idiomatic Julia, |
So, basically, |
That matches my understanding. In that particular case one can usually disambiguate via the position of get!(dict::AbstractDict,key,default)
get!(callable,dict::AbstractDict,key) However, this would fail in the pathological cases where one desires to use |
Note that Actually, I've been wanting to add a |
Correct; |
Enabling generation of a DTable via `d = DTable(CSV.File, files)` by removing the `::Function` type annotation per the suggestion in [this thread](JuliaLang/julia#43491). --------- Co-authored-by: Julian Samaroo <[email protected]>
There is no docstring for it, it doesn't seem to be covered by the manual. Docstrings even seem to explicitly cover it, e.g.
Yet it seems like a very useful concept, and I've been using it in my code without even questioning how "official" it is. I then was surprised when a colleague didn't know about it, and now I wonder where I first picked it up ... ;-).
Anyway: is it deliberately hidden, or would a patch documenting it be welcome?
The text was updated successfully, but these errors were encountered: