Re: A proposal on if and else

2003-01-22 Thread Thom Boyer
Smylers wrote: Thom Boyer wrote: The primary advantage, to my mind, in using C, is that it eliminates the dangling-else ambiguity -- so splitting it in half removes almost ALL the value of even having an C keyword. Surely it's the compulsory braces, even with a single statement, which eliminat

Re: A proposal on if and else

2003-01-21 Thread Smylers
Thom Boyer wrote: > The primary advantage, to my mind, in using C, is that it > eliminates the dangling-else ambiguity -- so splitting it in half > removes almost ALL the value of even having an C keyword. Surely it's the compulsory braces, even with a single statement, which eliminates that prob

RE: A proposal on if and else

2003-01-21 Thread Thom Boyer
Rafael Garcia-Suarez [mailto:[EMAIL PROTECTED]] wrote: > The tokeniser could send two tokens "else" and "if" whenever it > recognizes the keyword "elsif" -- so this isn't a problem. The primary advantage, to my mind, in using C, is that it eliminates the dangling-else ambiguity -- so splitting it

Re: A proposal on if and else

2003-01-21 Thread Dave Whipp
"Joseph F. Ryan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Rafael Garcia-Suarez wrote: > > > >The tokeniser could send two tokens "else" and "if" whenever it > >recognizes the keyword "elsif" -- so this isn't a problem. > > > > I think the point of having

Re: A proposal for separable verbs. (Was: Re: A proposal on if and else)

2003-01-20 Thread Simon Cozens
[EMAIL PROTECTED] (Austin Hastings) writes: > Let's support separable verbs. That (http://dev.perl.org/perl6/rfc/309.html) is a really good idea. -- Writing software is more fun than working.

RE: A proposal for separable verbs. (Was: Re: A proposal on if and else)

2003-01-20 Thread Austin Hastings
--- Brent Dax <[EMAIL PROTECTED]> wrote: > Austin Hastings: > # 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

RE: A proposal for separable verbs. (Was: Re: A proposal on if and else)

2003-01-20 Thread Brent Dax
Austin Hastings: # 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 # _ elsun

A proposal for separable verbs. (Was: Re: A proposal on if and else)

2003-01-20 Thread Austin Hastings
--- "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

Re: A proposal on if and else

2003-01-20 Thread Rafael Garcia-Suarez
Joseph F. Ryan wrote in perl.perl6.language : > > 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. Oh, yes, I re

Re: A proposal on if and else

2003-01-20 Thread Joseph F. Ryan
Rafael Garcia-Suarez wrote: Joseph F. Ryan wrote in perl.perl6.language : I think the point of having C as a sub rather than as a separate syntax is so the parser doesn't have to do anything special for special keywords. I think the goal was to simplify the compiler, but with the discussion o

Re: A proposal on if and else

2003-01-20 Thread Rafael Garcia-Suarez
Joseph F. Ryan wrote in perl.perl6.language : > > I think the point of having C as a sub rather than as a separate > syntax is so the parser doesn't have to do anything special for > special keywords. > > I think the goal was to simplify the compiler, but with the > discussion of recent weeks, it

Re: A proposal on if and else

2003-01-20 Thread Joseph F. Ryan
Rafael Garcia-Suarez wrote: Brent Dax wrote in perl.perl6.language : Yes, I know this means that we have 'else if' instead of 'elsif', but it's only two more characters and it makes the grammar cleaner. The tokeniser could send two tokens "else" and "if" whenever it recognizes the keywor

Re: A proposal on if and else

2003-01-20 Thread Rafael Garcia-Suarez
Brent Dax wrote in perl.perl6.language : > Yes, I know this means that we have 'else if' instead of 'elsif', but > it's only two more characters and it makes the grammar cleaner. The tokeniser could send two tokens "else" and "if" whenever it recognizes the keyword "elsif" -- so this isn't a probl