develooper Front page | perl.perl5.porters | Postings from May 2008

Re: thoughts about overloading method calls

Thread Previous
From:
Ricardo SIGNES
Date:
May 6, 2008 10:59
Subject:
Re: thoughts about overloading method calls
Message ID:
20080506175850.GA1615@minion169.office.icgroup.com
* Aristotle Pagaltzis <pagaltzis@gmx.de> [2008-05-06T13:36:45]
> * Ricardo SIGNES <perl.p5p@rjbs.manxome.org> [2008-05-06 19:05]:
> > a) am I totally wrong and stupid?  please point out how and why
> 
> All I have to say is I’ve always wanted something like this.

mst pointed out that "autobox leads the way," but autobox can't do:

  my $method = 'blort';
  $obj->$method;

...and I think that is critical.

It also can't do $obj->$coderef, and I'm not sure what we'd want to do with
$object->fqmn;

It seems like in all cases: punt to the method call handler.

-- 
rjbs

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About