Austin Hastings <[EMAIL PROTECTED]> writes: > --- "Joseph F. Ryan" <[EMAIL PROTECTED]> wrote: >> If the final design stays the way it is now, there really won't be >> a "lexer". Instead, a perl6 grammar parses the data, and builds up >> a huge match-object as it, well, matches. This match object is then >> munged into the optree. >> > > With this in mind, I'll say it again: > > Let's support separable verbs. > > Here's how: > > # Note my arbitrary selection of _ as separation indicator. Feel free > to replace this with something more appropriate: > > sub if ($test, &block) > _ elsif ($test, &block) is optional is floating is multi > _ elsunless ($test, &block) is optional is floating is multi > _ else (&block) is optional is fixed > { > while (!$args[0].test) shift; > &args[0].block(); > }
Mmm... Smalltalk style message specifiers here we come... method Bool::ifTrue (&trueBlock) _ ifFalse (&falseBlock); ($a == $b).ifTrue { do_this() } ifFalse { do_that() } I really like this idea or something like it. -- Piers