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

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

Thread Previous | Thread Next
Aristotle Pagaltzis
May 26, 2016 20:44
Re: [perl #128241] Deprecate /$empty_string/
Message ID:

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

Aristotle Pagaltzis // <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About