Why D const is annoying

Jacob Carlborg doob at me.com
Wed May 2 05:19:34 PDT 2012


On 2012-05-02 13:41, Chris Cain wrote:

> If that's what you want, then that's precisely what D does. "According
> to the public interface of Student, none of the methods I will use will
> modify the object." As opposed to C++'s method of "According to the
> public interface of student, these methods have comments that say that
> they say they won't change the object, but I can't tell if it does or not."

For D, it's not limited to the public interface. The rules apply to ALL 
methods and fields.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list