Why submethods

2005-10-29 Thread Damian Conway
In his use.perl.org journal, Luke wrote: To be fair, Damian responded to my query, but he didn't answer my question. He gave more an example of how submethods are used, rather than why they are used. Subroutines are useful inside classes, for factoring class-specific implementation details

Re: should roles be parameterized?

2005-10-29 Thread Luke Palmer
On 10/28/05, Christopher D. Malon [EMAIL PROTECTED] wrote: On Oct 28, 2005, at 11:13 PM, Luke Palmer wrote: Trying to think through the VectorSpace example, and a slightly more complicated example (a Field), I'm starting to wonder whether roles need to be parameterized somehow. (Maybe they

Re: Why submethods

2005-10-29 Thread Luke Palmer
On 10/29/05, Damian Conway [EMAIL PROTECTED] wrote: So we need a mechanism that is externally (i.e. from a class interface point-of-view) a subroutine, but internally has the features of a method (i.e. has an invocant). Since it's externally sub-like but internally method-like, we call this

Re: Why submethods

2005-10-29 Thread Stevan Little
Luke, On Oct 29, 2005, at 3:42 PM, Luke Palmer wrote: Another thing that scares me with the utility sub point of view follows: class Foo { method process_data($data) { $.help_process_data($data); } submethod help_process_data($data) {