Why do "const inout" and "const inout shared" exist?

Ali Çehreli via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 1 15:47:36 PDT 2017


On 07/01/2017 02:47 PM, Andrei Alexandrescu wrote:
 > the simplified qualifier hierarcy in
 > http://erdani.com/conversions-simplified.svg.

Can't we simplify it by cutting it in half and adding that immutable is 
implicitly shared?

1) unqualified -> const
2) inout -> const
3) immutable -> const

4) shared is implicit only for immutable

 > Is there a need for combining const and inout?

I think there is a reason but only one person knows. :)

Ali



More information about the Digitalmars-d mailing list