Opt-in for including argument names in ABI

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Thu Sep 17 16:11:08 UTC 2020

On Thursday, 17 September 2020 at 14:12:13 UTC, Seb wrote:
> tl;dr: `pragma(mangle, withArgumentNames:true)` would be a way 
> to tell the compiler to include the argument names in the ABI, 
> s.t. overloads with different names can be resolved.
> Why?
> 1) Provide implementations for different input formats
> ------------------------------------------------------
> ```
> sin(deg: 90);
> sin(rad: 0.5);
> ```

I think the example provided is not the best argument for this 
feature. The problem with it is that deg, and rad, should 
actually be distinctive types. Then you could implement those 
types to support following syntaxes such as 0.5 * rad or 0.5.rad, 
for convenience.


More information about the Digitalmars-d mailing list