Graham wrote:

   > On Fri, May 18, 2001 at 10:36:59PM -0400, John Siracusa wrote:
   > > > print keys $foo.prop;           # prints "NumberHeard"
   > > > print values $foo.prop;         # prints "loneliestever"
   > 
   > This is an example of one of my concerns about namespace overlap
   > with methods. What would happen if there was a method called prop ?
   > Have we basically said that there cannot be a method called prop ?

No, we have basically said that there cannot be a method called prop if you
want to access the object's properties through its prop property.


   > Personally I would rather see something other than . for accessing
   > properties. As things stand the functionality of a working
   > program can be completely changed/broken by defining a sub that
   > conflicts with a property.

Er...yes...that's rather the point of the exercise: to be able to
polymorphically override the behaviour of properties by defining
methods.

Should we deprecate inheritance because the functionality of a working
program can be completely changed/broken by defining a derived method
that conflicts with an inherited method?

Damian

Reply via email to