preparing for const, final, and invariant

Anders Bergh anders at andersman.org
Sat May 19 09:40:43 PDT 2007


On 5/19/07, bobef <asd at asd.com> wrote:
> Do you think that any user cares about if you use consts in your code or not? This is what I mean when I talk about usability. We write applications not code. We should focus on the usability. If it is easier to write - good, but the application is what is important, no the code (yes, of course it matters too). Plus what consts are you talking about in C++? Just cast them to void* and back to the type without const... If you want to modify it nothing is stopping you, if not just don't do it :)

I think users want their applications to be safe and stable, and
consts help with that.

Of course, const is not a magical way to make code safer... but it helps.

-- 
Anders



More information about the Digitalmars-d-announce mailing list