Why D const is annoying
Chris Cain
clcain at uncg.edu
Wed May 2 05:34:51 PDT 2012
On Wednesday, 2 May 2012 at 12:19:35 UTC, Jacob Carlborg wrote:
> For D, it's not limited to the public interface. The rules
> apply to ALL methods and fields.
Indeed. I may have forgot to add "in any way shape form or
fashion" to that particular line, but it's important to node that
const means it won't change anything about the object (which
includes fields).
Which makes much more sense than "logical const" which has
completely arbitrary meaning in almost every case I've seen.
More information about the Digitalmars-d
mailing list