Shallow constness?
Dicebot
public at dicebot.lv
Tue Jul 23 11:09:36 PDT 2013
On Tuesday, 23 July 2013 at 18:01:58 UTC, Maxime
Chevalier-Boisvert wrote:
> I saw that one can define a getter function without a setter to
> achieve this behavior, but that seems like a little bit of a
> hack.
As far as I am aware, it is not a hack, but recommended practice.
It actually does make sense - what you want has nothing to do
with actual mutability of a member (at least within D concept of
mutability) but is more like a tool for controlling access to it.
More information about the Digitalmars-d
mailing list