Date: Sun, 2 Feb 2025 23:56:15 +0300
On 2/2/25 23:52, Frederick Virchanza Gotham via Std-Proposals wrote:
> On Sun, Feb 2, 2025 at 8:01 PM Jeremy Rifkin wrote:
>>
>> Most people would never care about the mangled name and demangles are easy to use.
>
>
> It would be useful where two types are identical but you want to give
> them different names, for example:
>
> typedef vector<int> IntVec;
> typedef vector<int> CollectionOfSerialNumbers <=>
> mangle("CollectionOfSerialNumbers");
>
> This will make it easy to differentiate overloaded functions:
>
> void Func(IntVec &);
> void Func(CollectionOfSerialNumbers &);
>From the language perspective, IntVec and CollectionOfSerialNumbers are
the same type, so I don't see how the two overloads would work. At
least, your proposal doesn't address that.
> On Sun, Feb 2, 2025 at 8:01 PM Jeremy Rifkin wrote:
>>
>> Most people would never care about the mangled name and demangles are easy to use.
>
>
> It would be useful where two types are identical but you want to give
> them different names, for example:
>
> typedef vector<int> IntVec;
> typedef vector<int> CollectionOfSerialNumbers <=>
> mangle("CollectionOfSerialNumbers");
>
> This will make it easy to differentiate overloaded functions:
>
> void Func(IntVec &);
> void Func(CollectionOfSerialNumbers &);
>From the language perspective, IntVec and CollectionOfSerialNumbers are
the same type, so I don't see how the two overloads would work. At
least, your proposal doesn't address that.
Received on 2025-02-02 20:56:18