Interesting paper on composing type definitions

Andrei Alexandrescu via Digitalmars-d digitalmars-d at
Sun Mar 5 17:37:18 PST 2017

On 3/4/17 10:36 PM, Andrei Alexandrescu wrote:
> -- Andrei

An idea inspired by this paper would be a type Sum such that Sum!(A, B) 
stores both states of A and B and the joint API offered by the two. 
Would be a good exercise in applying introspection. Also, when there are 
clashing primitives, Sum might offer the option to make one of the types 
"dominant", eliminate the function from the joint interface, or disallow 
composition altogether. -- Andrei

More information about the Digitalmars-d mailing list