Make dur a property?
Nick Sabalausky
SeeWebsiteToContactMe at semitwist.com
Fri Jan 25 11:27:51 PST 2013
On Thu, 24 Jan 2013 23:36:30 +0400
Dmitry Olshansky <dmitry.olsh at gmail.com> wrote:
>
> These days properties imply an action of, well, obtaining said value.
> If it's a wrapper as in "return zis variable" something is wrong
> already.
>
I agree in principle, but unfortunately "return zis variable" getters
are often needed because no major language (that I know of) offers any
other way to create data that's privately-writable and
publicly-read-only - a very common need.
Ie, that's the "something" that "is wrong already": the lack of a
simple built-in "The public can only read this, but I can R/W it." to
obviate an extremely common idiom.
More information about the Digitalmars-d
mailing list