What IDE/EDITOR do you use for D?
via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 30 03:50:53 PDT 2014
On Thursday, 30 October 2014 at 10:18:27 UTC, eles wrote:
> who'd written C++ from the beginning. He said he could never
> remember whether his variables were referenced or dereferenced,
> so he always used pointers. He said the little asterisk always
> reminded him..
One alternative is to have two assignment operators and two
equality operators
ref(Something) a :- new Something(1)
ref(Something) b :- new Something(2)
ref(Something) c;
c :- a; // c now points to a
c := b; // a now contains the value of b
assert(a=b); // same value
assert( ! (a==b)); // not same object
More information about the Digitalmars-d
mailing list