property-like data members
Robert Jacques
sandford at jhu.edu
Sun Jan 2 21:55:47 PST 2011
On Sun, 02 Jan 2011 05:29:48 -0500, spir <denis.spir at gmail.com> wrote:
> Hello,
>
> Using properties allows travesting a method call into direct data
> access. What if the underlying member actually is plain data? Would it
> be possible to provide a real data member where the language expects a
> property (for instance as range empty & front properties)?
Yes, see the Uniform access principle
(http://en.wikipedia.org/wiki/Uniform_access_principle). (Though UAP
hasn't been discussed much on the newsgroup)
More information about the Digitalmars-d
mailing list