-
Notifications
You must be signed in to change notification settings - Fork 39
std: remove deprecation for macros.callsite
#1601
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
base: devel
Are you sure you want to change the base?
Conversation
`macros.callsite` was marked deprecated and is no longer deprecated, because it's still very useful. ## Details It was initially thought that the main use case for `macros.callsite` was fetching arbitrary arguments to a macro call. That use case was taken over by `varargs[untyped]`, but this is obvious short sighted. The routine still has utility and is no longer marked deprecated.
|
Hm, besides fetching the source location information of the macro invocation (which I agree is useful), what's a practical use case for One language-level problem I see with In any case, |
That is a big part of the utility, imo.
I'd have to look at it again but returning the typed variety might be the right thing to do as it happens after the overload has been resolved, so witnessing that makes sense.
In my mind, that's the thing with macros, they work on syntax, so their sensitivity to forms of expression is a feature not necessarily a bug, such as a DSL where on wants to ensure that prefix call notation is only used for calls, and dot notation for field access. Much of the transform level facilities could be taken over by the dot operator overloading experimental feature, however.
That might suit the name better, as the reading could well be, "tell me the source location of the callsite", as opposed to, "give me the shape of the call at the callsite". Maybe the better thing to do is make dot operator no longer experimental, and then change callsite to return an |
Yep, I know, but I'm not sure what
No no, I very much agree that macros should be to differentiate between call forms. What I meant is something else: the various call syntax (command form, prefix form, string call, etc.) are generally said to not affect semantics, being purely syntactic information. With current-day Macros don't have to do so, of course, but the ability being there does encourage this somewhat. To reiterate, nothing regarding syntax form sensitivity for macro arguments should change, I just don't think this sensitivity should extend to the macro invocation itself (like it is possible now, via
That sounds good to me. |
Summary
macros.callsitewas marked deprecated and is no longer deprecated, because it's still very useful.Details
It was initially thought that the main use case for
macros.callsitewas fetching arbitrary arguments to a macro call. That use case was taken over byvarargs[untyped], but this is obvious short sighted. The routine still has utility and is no longer marked deprecated.Notes for Reviewers