Dan Sugalski wrote much sense, including these gems: > *) Method: Some sort of action that an object can do. Methods are > global and public--only one foo method for an object. Methods may be > inherited from parent classes, or redefined in a particular class. > Redefined methods hide parent class methods of the same name
What about redefining methods for a particular object instance? It's something that Ruby does and can be extremely useful. > Properties and methods share a namespace, and methods win. If I do: > > a = foo.bar; > > I'll call the bar method of foo if foo has a bar method, otherwise > I'll fetch the bar property. Python does this (right?) and Perl 6 > will do this. (Yes, it will. Inside information, trust me. Unless > that changes this week...) Will there be some way to explicitly indicate that one is required but not the other? I can imagine times when you would want to access a property but not have it masked by a method, or call a method if it exists but not fall back on a property. > Code must be able to fetch a handle on a particular method for later calling By this I presume you mean that the handle would be frozen to the method as it was when then handle was fetched? If you later re-define the method, the handle would remain pointing at the original method, not the new one. Or not? A