Stream: t-compiler

Topic: bikeshed: `ExpnId` vs `InvocId`


Vadim Petrochenkov (Jul 02 2019 at 11:24, on Zulip):

Should I rename Mark into ExpnId or InvocId? :slight_smile:

"Mark" identifies both a macro invocation (foo!()), and expansion process and expansion result of that macro invocation.

Vadim Petrochenkov (Jul 02 2019 at 11:25, on Zulip):

(Depending on the context.)

Vadim Petrochenkov (Jul 02 2019 at 11:26, on Zulip):

Mark itself is obviously bad because nobody knows what it is.

Vadim Petrochenkov (Jul 02 2019 at 11:28, on Zulip):

On one hand, the invocation is primary and its expansion is secondary, but on another hand "invocation" may mean a for loop (with "expansion" == "desugaring"), or be entirely invisible in case of e.g. test harness generation.

Vadim Petrochenkov (Jul 02 2019 at 11:34, on Zulip):

One naming example: ExpnInfo is some data attached to the ID in question, it is actively used by various lints, for example.
Would it look better as InvocInfo? Probably not, since it's usually obtained from a span and span is more associated with an expansion of a macro than with its call.

Matthew Jasper (Jul 02 2019 at 11:47, on Zulip):

:+1: to ExpnId.

centril (Jul 02 2019 at 13:37, on Zulip):

I think we can afford ExpanId; Expn looks too similar to Expr

Last update: Nov 16 2019 at 01:40UTC