-
-
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
Standalone dotted function names #40858
Comments
|
|
Indeed... One can do |
#24990 could be extended to support Maybe better would be to have |
This issue was slightly derailed by the underscore question. But seeing that syntax has not worked out so far, can we again focus on why we have @ararslan noted in the original issue:
And it seems like the answer is yes, it is a bit weird that one is |
Maybe just a nicer function name for it like |
Triage concurs that a nicer name (e.g. dotted) would be good but doesn't have a strong opinion about the specific name. But using Edited to fix |
Is
What would be the expected result? (Also dont quite get the |
One trouble with julia> f = Ref{Any}()
Base.RefValue{Any}(#undef)
julia> g = f.
x = 2
2 What if julia> const var"." = Broadcast.BroadcastFunction
Base.Broadcast.BroadcastFunction
julia> var"."(sin)
Base.Broadcast.BroadcastFunction(sin)
julia> Meta.parse(".(f)")
ERROR: ParseError:
# Error @ none:1:1
.(f)
╙ ── invalid identifier |
wait... that's valid?? what does it mean? EDIT: oh I see
although I'm pretty surprised this doesn't throw a parse error... |
I like that |
It not only looks like it, but julia> var"."(*) === .*
true |
|
This is to track an idea originally from #34156: It would be nice to allow something like
map(f., a, b)
as a shorthand forBase.BroadcastFunction(f)
. Following #37583 this is now supported for operators, but it would be equally useful for functions I think.The text was updated successfully, but these errors were encountered: