in reply to Re: Re: Unexpected qr// behavior
in thread Unexpected qr// behavior

I suppose but the implementation has three cases (in order of best to worst case): re-used as a complete regex, not used at all, re-used as a component of a regex. If that's the motivation I would have thought it would be more important to swap the last two cases so that re-using it as a component isn't worse than not using it at all.

I'm thinking of /o is dead, long live qr//! for the basis of the sort.

  1. That qr// is compiled once and then used
  2. the qr// is compiled once and then not used
  3. the qr// is compiled twice and used once