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

Re: postfix dereference syntax

Thread Previous | Thread Next
David Golden
July 3, 2013 22:17
Re: postfix dereference syntax
Message ID:
On Wed, Jul 3, 2013 at 5:51 PM, D Perrett <> wrote:
> object methods. Would we be better with a syntax for builtin methods?
>   $arrayRef->>flatten;
>   $hashRef->>flatten;

Rik said "no autoboxing" anyway, but just to complete the thought, I
think that "methods on references" and "methods on objects" could
coexist. If a programmer doesn't know whether they have a reference or
an object, it's up to them to sort it out.  Objects should be opaque.

Rather than ->> I'd prefer to just see it done with CORE, if that
could be made to work, so it's similar to ordinary superclass method


If we had core classes for containers and if references were objects
this would all be a lot easier, but that ship has probably sailed.


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