in reply to Re: Perl 6 property mini-tutorial
in thread Perl 6 'is dim' point
The two main advantages of encapsulating these functions in classes are that anyone who is defining a property can provide state (i.e. class attributes) for that property if necessary, and can also create sets of related properties using inheritance.
A more subtle advantage is that using a class-based interface for specifying properties gives us a clean way to extend that interface at a later time, should we miss some useful feature in the initial design.
|
|---|