On Monday, 31 March 2014 at 03:25:11 UTC, Manu wrote:structs can pretty easily be reference types too:
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.
struct RefType {
struct Impl {
// put all the stuff in here
}
Impl* impl;
alias impl this;
// add ctors and stuff that new the impl
}