Purity, @safety, etc., in generic code

deadalnix deadalnix at gmail.com
Fri Feb 22 22:06:43 PST 2013


On Friday, 22 February 2013 at 18:55:58 UTC, kenji hara wrote:
> No, const/inout overload does not intend to solve 'method 
> hiding' problem.
>
> To clarify the situation, I try to explain.
>
> class A {
>   void foo() {}
>   void foo() const {}
> }
>

You missed the important part. I'm talking about overload, not 
override. IE, not method hiding.

What you have in class A here is useful for use cases that are 
now solved by inout (getting ranges/iterator from collection for 
instance).



More information about the Digitalmars-d mailing list