<div class="gmail_quote">On Thu, Jul 7, 2011 at 8:45 PM, John Freeman <span dir="ltr"><<a href="mailto:jfreeman@cse.tamu.edu">jfreeman@cse.tamu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On 7/7/11 8:49 PM, Chandler Carruth wrote:<br>
> Thoughts?<br>
<br>
I like all of it. I do have a question: is the term "expansion" also<br>
used in another case involving templates, like parameter packs?</blockquote><div><br></div><div>Oof, yea, it is.</div><div><br></div><div>On the good side, the standard uses 'expansion' in that context almost exclusively as 'pack expansion', a term defined in the standard. I suspect any use we made of it in diagnostics could also be profitably tied to the word 'pack'.</div>
<div><br></div><div>Also, both the C and C++ standards refer to 'macro expansion' to mean this.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 Should<br>
we try to use a third term for macros in that case, like "substitution"<br>
(which is also used for templates (think "SFINAE");</blockquote><div><br></div><div>Good idea, the C standard uses 'substitution' to describe the process through which arguments to function-style macros are substituted into the macro body (C99 6.10.3.1). We should at the least try to use 'substitution' in the code surrounding this process in Clang IMO.</div>
<div><br></div><div>However, I don't think there are many contexts where we need or want to distinguish between macro expansion and argument substitution, but i'd not be opposed to using those two compound terms if that situation arises.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> maybe there is no<br>
winning this battle)?<br></blockquote><div><br></div><div>I'm fairly certain there is no perfect word. ;] That said, I like that both macro expansion and argument substitution are mentioned in the standard.</div><div>
<br></div><div>The only other term I've thought about is 'replacement' as that's what the standard uses in most cases. However, for diagnostics and thinking about how the preprocessor works, I actually find 'expansion' much more helpful. However, if others like the C standard's 'replacement' terminology, I'd be down with that. =]</div>
</div>