const?? When and why? This is ugly!

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Mar 8 09:17:11 PDT 2009


Derek Parnell wrote:
> On Sun, 08 Mar 2009 01:19:15 -0800, Walter Bright wrote:
> 
>> Derek Parnell wrote:
>>> Walter, you have side-stepped the problem in question by talking about a
>>> totally different problem.
>> It's the same issue. When you use a cast, you are subverting the type 
>> system. That means you have to be sure you are doing it right. The 
>> compiler cannot help you.
> 
> I disagree. There are two issues being discussed. One by Burton and another
> by yourself. Burton is showing how that data declared as immutable can be
> modified. You are talking about the dangers of using casts. NOT THE SAME
> ISSUE. 

It is THE VERY SAME ISSUE.

Andrei



More information about the Digitalmars-d mailing list