On May 25, Jonathan Scott Duff said:

On Tue, May 24, 2005 at 11:24:50PM -0400, Jeff 'japhy' Pinyan wrote:
I wish <!prop X> was allowed.  I don't see why <!...> has to be confined
to zero-width assertions.


I don't either actually. One thing that occurred to me while responding
to your original email was that <!foo> might have slightly wrong
huffmanization.  Is zero-width the common case?  If not, we could use
character doubling for emphasis:  <!foo> consumes, while <!!foo> is
zero-width.

But that's not even the point. The ! in <!after ...> is not what makes <!after ...> a zero-width assertion, it's the 'after' that does that. All the ! does is negate the boolean sense of the assertion, which seems like a useful thing to have.

Hrm, but I think I see the problem. How does one define "negation" for an arbitrary assertion? Is <!foo> saying "if <foo> matches, fail"? Because then <!prop X> doesn't make mean the same as <-prop X>. We don't want negation, we want complement.

I guess '!' is only well-defined for zero-width assertions. When you want to say <!foo>, I guess <!before <foo>> or <!after <foo>> is the proper way to go.

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart

Reply via email to