The Status of Const

Simen kjaeraas simen.kjaras at gmail.com
Fri Aug 13 04:10:58 PDT 2010


Michel Fortin <michel.fortin at michelf.com> wrote:

> 	Object o; // implicitly a reference
> 	Object ref o; // explicit reference marker
>
> Both would be allowed and equivalent. While the first form is nicer to  
> the eye, the second makes it easy to apply a type modifier while  
> excluding the reference:
>
> 	const(Object)ref o;
> 	shared(Object)ref o;

This is awesome. Now, if only W or A could have a look, and not shoot
it down...

-- 
Simen


More information about the Digitalmars-d mailing list