develooper Front page | perl.perl5.porters | Postings from July 2013

Re: postfix dereference syntax

Thread Previous | Thread Next
David Golden
July 3, 2013 08:39
Re: postfix dereference syntax
Message ID:
[Since insomnia is kicking my ass]

On Wed, Jul 3, 2013 at 2:02 AM, Kent Fredric <> wrote:
> 1. If $foo is a bless, $foo->list would invoke (blessed $object)->list, not
> ARRAY->list , which meant you'd have to use a different syntax if you were
> inside a class definition.

Ugly option: do it with an upper case method, since those are
reserved.  But, frankly, I'd hate that, since my capslock is now a
control key and the uc typing overhead would annoy me more than
circumfix does.

> 2. ->@  could be imagined to be easily overloaded for, so bless()'d objects
> that *arent* arrays could still implement list deref overloads, so that
> they'd still work as arrays with things that need them to.

Assuming that it's implemented such that the resulting optree is an
ordinary array deref op, then the existing "@{}" overloading will
still work as it does now.


David Golden <>
Take back your inbox! →
Twitter/IRC: @xdg

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About