in reply to Re: Re: Re: Re: Re: Re: Re: Re: Re: Risks in the oblivious use of qr//
in thread Risks in the oblivious use of qr//

The core difference is that I don't see /test/ as having an explicit absense so much as I see a 'default' going on. Its just not explicit. With /test/i I see an explicit marking on what behaviour to use. I just don't think "explicitly not there" is a good way to think about it. If I meant to be explicitly off then I'd have written (?-i:...).

Of course I don't actually write that way, that's just how it *should* work.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Risks in the oblivious use of qr//
by demerphq (Chancellor) on Aug 12, 2003 at 14:25 UTC

    This implies that the flag that holds the /i status has to be tristate and not bi state. It also means that a new modifier needs to be added.

    Personally I think this is probably not worth the time as its trivial to use a regex to prep a qr// so that it is /i insensitive.


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

      No, it only means that the syntax for a negative /i is (?-i: ... ) and not something hanging off the end of the regex. No additional syntax is needed.

        Dio -- I still dont think you are thinking this through. Your change would break thousands and thousands of scripts. It completely redefines something that has been around for ever. The only way to introduce your idea without wreaking extreme havoc is to add a new modifier symbol and to change the /i flag to a tristate value. This is a signifigant change.

        Not only this, as stated your idea is not coded for the common case. For instance most people will be expecting no /i to mean "case sensitive" not "case senisitve but overridable". Which means that an awful lot of of people who DONT want the behaviour you describe are going to be typing (?-i:...) wheras if the behaviour you think is proper were triggered by a new modifier then we would only need to add /I (or whatever) to represent "case sensitive but overridable" and we wouldnt break any code out there and we would optimize for the common case.

        Nevertheless I really think this is moot. I think p5p would squash this idea almost instantly. Theres almost no chance of it happening at all. But if you want to try your luck see what the p5p folks think of your idea....

        Sorry mate, but no matter how much you bang on at this one its a losing proposition.


        ---
        demerphq

        <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...