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 2, 2021 20:24
Subject:
Re: undoing of auto-deref removal
Message ID:
642b35d0-9dc2-41ac-a03a-e8e3f3187abc@www.fastmail.com
On Tue, Mar 2, 2021, at 2:30 PM, L A Walsh wrote:
>  As I've stated before, the only reason detractors have given for
> allowing this is that they/you want the deref to work in the
> case that _perl_ _doesn't_ _support_.  This is a limitation of perl, not
> of auto-deref.  Perl cannot dereference something that is not already
> defined as a type in the language.

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.  autoderef broke that.

Your argument sounds, to me, like "Yes, but it said it was going to break that, so it's fine."

On the other hand, it makes autoderef less appealing, because "use a virtual array reference" becomes less safe.

At any rate, this debate happened years ago.  I considered the matter settled then, and I still do now, and I don't really plan to entertain further discussion on this feature.  The ship has sailed, and I'm glad to see it vanished over the horizon.

-- 
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