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

Re: review of perlexperiment, 2021-10

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
October 14, 2021 09:56
Subject:
Re: review of perlexperiment, 2021-10
Message ID:
20211014105622.446f1c55@shy.leonerd.org.uk
On Thu, 14 Oct 2021 12:41:35 +0900
Yuki Kimoto <kimoto.yuki@gmail.com> wrote:

>  Is it possible to change to the expected behavior?
...

That would be /possible/ but it would mean that it no longer behaves
like the existing ->isa method.

The original ->isa method behaves badly too:

  $ perl -E 'say "URGH" if (bless {}, "not-a-hash")->isa("HASH")'
  URGH

Thus is the core of the problem. Do we

  a) Implement `isa` exactly like `->isa`, including that mistake?

  b) Implement `isa` better, knowing it no longer matches `->isa`

Pick one. Both are bad. :(

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

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