develooper Front page | perl.perl5.porters | Postings from March 2021

Re: undoing of auto-deref removal

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
March 3, 2021 19:30
Subject:
Re: undoing of auto-deref removal
Message ID:
79da8d19-3433-4239-ac99-5e2c8232293e@www.fastmail.com
On Wed, Mar 3, 2021, at 5:00 AM, L A Walsh wrote:
> > In general, in Perl, if something expects to be handed a reference to 
> > an array, one can hand in a blessed object that provides 
> > array-dereference behavior.
> ----
>     "In general"?  Please state where in the documentation for perl that 
> this
> is a documented feature. 

perldoc "overload" under "Dereferencing."

>     When someone made that statement before, I asked, "How does Perl know
> an object provides array-dereference behavior.  How can perl know if it
> provides array-dereference behavior or hash-dereference behavior.  Such
> a statement is meaningless since there is nothing in the language to
> specify such a behavior.

"overload" is a well defined mechanism.  This has been present since at least 5.005.

I do not plan to engage more on this.  The matter was settled long ago and we (steering) are of one mind on the question of autoderef.

-- 
rjbs
Thread Previous | Thread Next


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