Interesting PRs: bringing type system legitimacy to shared allocators

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 28 10:09:22 PDT 2017


On Friday, 28 April 2017 at 01:12:39 UTC, Nick Sabalausky 
(Abscissa) wrote:
> On 04/27/2017 07:12 PM, Moritz Maxeiner wrote:
>>
>> Wasn't one major selling point of compile time introspection / 
>> duck
>> typing that we could stop using interfaces such... naming 
>> schemes?
>
> Not that I speak for everyone, but the way I see it, no, the 
> duck typing aspect is just something that's to be tolerated. 
> The real gold is simply being freed from both the rigid mess 
> and the runtime costs of class/interface hierarchies. I wish we 
> DID have to include some kind of "implements ForwardRange" or 
> "enum _thisStructImplements_ForwardRange" or some such to 
> declare a type actually intends to be a ForwardRange (or 
> whatever) and isn't merely qualifying as one by coincidence.

https://github.com/atilaneves/concepts

import concepts;

@models!(isForwardRange, MyType)
struct MyType { .... }


Atila


More information about the Digitalmars-d mailing list