Aquivalent References as in C++?

Lee leebraid at gmail.com
Fri Feb 22 00:37:18 PST 2013


On Wednesday, 18 April 2012 at 11:36:30 UTC, bearophile wrote:
> Namespace:
>
>> But i think, i'm probably the only one in D who really wants 
>> something like that.
>
> I have discussed this topic three or more times, and opened an 
> enhancement request around 2010-08-02:
> http://d.puremagic.com/issues/show_bug.cgi?id=4571
>
> Bye,
> bearophile

It really would be great to get this fixed.  I do consider it 
"broken" right now, considering that @safe is supposed to (from 
all the docs I've read on it) make your program incapable of 
using pointers incorrectly, etc.

Also, the argument that C++ doesn't provide a better guarantee 
with references seems highly flawed, since it's deliberately 
using pointers to make the case that references are broken.  If 
you make a point of using references everywhere, C++ is *MUCH* 
better at this.


More information about the Digitalmars-d-learn mailing list