What would be the consequence of implementing interfaces as fat pointers ?

Adam D. Ruppe destructionator at gmail.com
Sun Mar 30 20:32:35 PDT 2014


On Monday, 31 March 2014 at 03:25:11 UTC, Manu wrote:
> I also feel quite dirty using pointers in D where there is a 
> dedicated reference type available. I don't want * and & to 
> appear everywhere in my D code.

structs can pretty easily be reference types too:

struct RefType {
    struct Impl {
         // put all the stuff in here
    }
    Impl* impl;
    alias impl this;

    // add ctors and stuff that new the impl
}


More information about the Digitalmars-d mailing list