develooper Front page | perl.perl5.porters | Postings from May 2016

Re: [perl #128241] Deprecate /$empty_string/

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
May 26, 2016 20:44
Subject:
Re: [perl #128241] Deprecate /$empty_string/
Message ID:
20160526204349.GB4282@plasmasturm.org
Personally:

• I agree /$empty/ should be deprecated.

• I oppose changing its behaviour without a deprecation cycle.

• I would enjoy seeing // as “last successful pattern” gone entirely
  someday as a matter of taste, but I now believe this is a bridge too
  far past necessity.

  Consider that qr// already does not mean to use the last successfully
  matched pattern – it just always matches. If /$empty/ is also changed,
  then there is no way to accidentally trigger that behaviour during an
  attempt to compose or pass around a pattern. The only way to get that
  behaviour would be with a literal // in the program source.

  At that point, the special case is so well circumscribed that I see
  no real gain in excising it entirely, however ancient-Unix-warty it
  may be.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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