New library: open multi-methods

jmh530 via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Jul 19 08:33:28 PDT 2017


On Wednesday, 19 July 2017 at 13:46:24 UTC, Jean-Louis Leroy 
wrote:
>>
>> What if you do:
>>
>> shared static this(){
>>
>>   mixin(registerMethods);
>>
>> }
>
> You mean in openmethods.d?

Yes. I haven't tried something like that, but it seems like a use 
case for either static this or shared static this.

https://dlang.org/spec/class.html#StaticConstructor
https://dlang.org/spec/class.html#SharedStaticConstructor


More information about the Digitalmars-d-announce mailing list