Help - can't ADD constness

Bruce Adams tortoise_74 at yeah.who.co.uk
Sun Sep 16 17:20:27 PDT 2007


charles Wrote:

> Const is a god awful abomination that no language has gotten right, the 
> sooner its gotten rid of the better.  No one I work with has ever had a 
> situation where const actually paid off.
> 
As a seasoned C++ programmer I and my colleagues regularly use the c++ flavour of const with no problems. It may not be the best solution in the world but it works. I always found it a reasonably intuitive bit of syntactic sugar. That's not to say that we can't do better in D.
I'd recommend reading Scott Meyers effective C++ books for a start.
And perhaps we should review the deliberations that went into developing the C++ const system.
By the way, what languages other than C++ have some kind of const mechanism? They've got to be worth a review too.

Regards,

Bruce.



More information about the Digitalmars-d mailing list