Transitive const sucks

Bruce Adams tortoise_74 at yeah.who.co.uk
Wed Sep 12 12:18:30 PDT 2007


Carsten Sørensen Wrote:

> Bruce Adams wrote:
> > Someone correct me if I'm wrong but I thought D doesn't / wasn't going to support overloading methods on whether they are const or not. So this part of the discussion is almost moot.
> 
> Sorry if I wasn't totally clear. I'm not talking about overloading, but 
> overriding/implementing and introducing const.
> 
> 
> Best regards,
> Carsten Sørensen

You were totally clear but using a C++ concept of const methods which I believe (and may be wrong) has no analogue in D. I believe the intention was to keep it out of the language as it is an ambomination. That said, I'm not clear how you can get the proper semantics for e.g. overloads of [] in D without it.

Bruce.



More information about the Digitalmars-d mailing list