[PATCH] introduce attribute exalias

Alexandre Oliva oliva@adacore.com
Sat Aug 15 02:43:24 GMT 2020


On Aug 14, 2020, Nathan Sidwell <nathan@acm.org> wrote:

> 'exalias' sounds either like a used-to-be alias

*nod*

> or it sounds like exa-lias, making me wonder what a 'lia' is, and why
> I want 10^18 of them

heh

>>> I'm sure we can bikeshed the name 'exalias' doesn't seem very mnemonic
>>> to me.  'symbol_alias' or something?

>> I don't like symbol_alias; that this feature names a symbol is not a
>> distinguishing feature from the preexisting alias attribute.

> right,  I realize this is different to the existing alias.

The point was that the existing alias already takes a symbol name.

> It's always struck me that the existing semantics are not c++
> friendly.

Indeed, avoiding the need for using mangled symbol names to refer to
language entities is the very issue I've set out to solve.  It helps
with aliases in C++ as much as it helps with imports in Ada.

> Perhaps alias is not the right name at all.

I kind of like the explicit present of "alias" because, well, what we
get is an alias, to the point that, if asm aliases aren't available, it
won't work.  And, if they are, you can use the so-assigned name as an
alias target, so it's a good thing if they're typographically related.

One could even argue that this new attribute is more deserving of the
term alias than the existing one, and that the existing one should be
renamed to "aliased_to" or so.  But I'm not seriously suggesting us to
rename a long-available attribute while assigning uses thereof a
different semantics, that would be preposterous.

Since you don't seem to have liked 'aka' either, how about 'nickname',
or 'nicknamed'?  A more convenient name to refer to an entity is exactly
what this is about, eh?

-- 
Alexandre Oliva, happy hacker
https://FSFLA.org/blogs/lxo/
Free Software Activist
GNU Toolchain Engineer


More information about the Gcc-patches mailing list