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

PR: Add an `isa` operator #17212

Thread Next
From:
Paul "LeoNerd" Evans
Date:
October 24, 2019 14:32
Subject:
PR: Add an `isa` operator #17212
Message ID:
20191024153216.6c9689fe@shy.leonerd.org.uk
I have now finished a first draft of my `isa` PR:

  https://github.com/Perl/perl5/pull/17212

This PR implements the proposed operator as was suggested in
https://github.com/Perl/perl5/issues/17200.

As before, to avoid duplication it would be best to keep discussions in
one place - so probably best on the GH issue/PR.

There is one outstanding design question - and that is what to do with
an unquoted bareword to a non-existing package when in `strict` mode:

  use strict;
  use feature 'isa';

  if( $obj isa This::Package::Does::Not::Exist ) { ... }

As explained in a comment:
  https://github.com/Perl/perl5/pull/17212#issuecomment-545933763
I can see arguments in favour of either behaviour.

I invite discussion on the PR on that issue in particular as well as
any other concerns. 

-- 
Paul "LeoNerd" Evans

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

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