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
RFC: parse a'
as call expression
#33683
base: master
Are you sure you want to change the base?
Conversation
a'
as call expression
Tough call. It does seem like this would have been better, but I'm not sure it's worth changing. |
This is technically breaking since macros may be relying on the current AST representation. |
I totally understand the concerns, and that this might be too breaking. On the other hand I wonder, how much code really relies on this, and if this wouldn't actually fix more potential bugs than it causes problems. 😁 |
True, that's fair. We do make technically breaking changes if they don't actually break packages. |
Just bumping this thread. Has anyone formed any strong opinions on this in the past few months? I think it's a good idea. It's more consistent with how we treat prefix / infix operators and it makes it possible to do things like locally shadow |
The type piracy here is coming from AD packages wanting to use |
Would it make sense to run PkgEval on this, to get a sense of how breaking this actually is? |
@nanosoldier |
Good news, everybody. It's not necessary to change parsing to do this. It can be done in lowering instead:
(julia-syntax.scm) Currently, all syntax without an identifier name (e.g. indexing, vcat, etc.) lowers to call some Base function. We have discussed before changing them all to call lexically-scoped names like |
Is lowering to a |
If I understand correctly, #34507 is a pure parsing issue --- entirely about surface syntax. If we did it, we'd probably parse suffixed adjoint operators as |
Your package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt |
I think this could be worth reconsidering for a 2.0 release. Would it make sense to add it to the milestone? |
It seems weird to me that the adjoint operator still gets its own expression, because except for its special syntax it is basically a regular function call, so I thought, I'd just give it a go. This should also simplify some meta programming, since
'
doesn't have to be special-cased anymore. What do people think, is this a good idea?