Why to have properties to sort or duplicate arrays ?

Hasan Aljudy hasan.aljudy at gmail.com
Sat Jan 27 16:18:32 PST 2007



Pierre Renié wrote:
> Hello,
> To me, reading a field or a property should not modify the object.
> The problem is that just an access to the properties 'reverse' or 'sort' are modifying my array. These 2 properties should be method instead.
> 
> I think that the property 'dup' should be a method too, because 'dup' is not a value of my Array object, it does something.

Well, in D, properties are just normal methods.



More information about the Digitalmars-d mailing list