Overloading based on attributes - is it a good idea?

Manu turkeyman at gmail.com
Tue May 28 22:03:07 UTC 2019


On Tue, May 28, 2019 at 11:10 AM Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On 5/28/2019 10:35 AM, Jonathan Marler wrote:
> > After reading Walter's response here, another thought came to mind that instead
> > of attribute overloading, a template with static-if could also be used.
>
> @nogc attributes are often inferred. Such constructs would make it undecidable.

I have never encountered a case with @nogc where I would want to
overload on attribute alone; the function signature is never the same
between a @nogc and uses-gc function.


More information about the Digitalmars-d mailing list