On Wed, 2002-09-04 at 12:41, Luke Palmer wrote:
> Aaron Sherman wrote:
> > So, for example here are some translations of existing operators:
> >
> > + <={.count > 0}>
> > * <={1}>
> > *? <={1}>?
> > <8> <={.count == 8}> # No optimization possible!
>
> Could it be done this way?:
>
> @c:=(.)* <( @c == 8 )>
>
> Surely inefficient, but it works right (I think). Would there be a more
> efficient way to do it within the existing system?
>
> It's easy to do non-greedy, too. Just slap a question mark on the end of
> that star.
What you suggest is just a special-case of what I'm suggesting, so I
agree :)
Adding the syntax of C<< <={...}> >> just gives you the ability to do
this for arbitrary expressions without saving the results (unless you
want to).