Why D needs tail const

Stewart Gordon smjg_1998 at yahoo.com
Wed Mar 28 08:35:45 PDT 2012


On 28/03/2012 16:09, Stewart Gordon wrote:
<snip>
>> Something like an onConst()/onImmutable templated methods for structs/classes?
<snip>
> I'm not sure whether this would be a good idea. And it would solve only one of
> Rebindable's many shortcomings....

Moreover, any feature that makes a type a completely different type if constancy is 
applied to it could be abused in all kinds of ways, as well as breaking generic 
programming.  And I can't see any other genuine use case it might have.  On this basis, we 
might as well just implement built-in tail const instead.

Stewart.


More information about the Digitalmars-d-announce mailing list