Re: RFC 193 (v1) Objects : Core support for method delegation
[email protected] ("David E. Wheeler") Tue, 05 Sep 2000 10:57:03 -0700
| Newsgroups | perl.perl6.language.objects |
|---|---|
| Organization | Salon Internet |
| Message-ID | <[email protected]> |
Perl6 RFC Librarian wrote: > > This and other RFCs are available on the web at > http://dev.perl.org/rfc/ > > =head1 TITLE > > Objects : Core support for method delegation This idea rocks, Damian! I want it now! Just one suggestion, however... > The proposed delegation mechanism would work via a pragma: > > use delegation > attr1 => [qw( method1 method2 method3 )], > attr2 => [qw( method4 method5 )], > attr3 => [], > attr4 => [], > # etc. > ; When I see those empty arrayrefs, I think "delegate to *no* methods in those classes stored in attr3 and att4," rather than "delegate all method calls to those attributes." Just in the name of greater clarity, I might like to see something like URI suggested: attr3 => [ALL] Or perhaps (to borrow from SQL and to ignore the question of typeglobs for the moment): attr3 => [*] This way, I know that an empty arrayref means "all methods" rather than "none." Comments? Thanks David