@property
Max Samukha
spambox at d-coding.com
Thu Jun 24 15:51:06 PDT 2010
On 06/25/2010 12:51 AM, Jonathan M Davis wrote:
>
> writeln() isn't a property because it makes no sense to replace it with a
> getter or setter. The same goes for save() or popFront() on a range.
> However, things like length() and empty() are properties because they could
> be replaced with functions like getLength() and isEmpty().
>
I don't think the rule applies universally. For example, .NET is full of
functions starting with Set/Get that are not properties because they
perform complex/lengthy computations or for some other washy reason.
More information about the Digitalmars-d
mailing list