On Mon, 2002-04-29 at 16:41, Luke Palmer wrote:
> > So, the answer to your question is: yes, I do propose that there should
> > be an elsif, elsloop and elsfor. That's it. Three words, not an
> > expansive list of ever-more-complex words.
> 
> Oh! I have an idea! Why don't we make the lexer just realize a prefix 
> "els" on any operator. Then you could do C<if .. {} elsexit>. :P

That's just a bit more off-the-wall than adding for keywords (the three
above, plus I've been corrected on the while thing). Let's not get too
hyperbolic here; it doesn't help the discussion along much.

> My point is that, IMO, this whole "els" thing is completely preposterous. 
> I'm the kind of person that likes to keep down on keywords. And I never 
> liked Perl5's C<elsif> anyway; I always preferred C<else if>. I really 
> don't understand what at all is appealing about C<elsloop>. 

If you want if/else if, talk to Larry (I would not disagree, though old
friends are hard to part with). I'm just saying that as long as if has
the syntax it has, we should replicate that on loops.

> I don't want this thread to turn into a mindless squabble. Perhaps people 
> could look at the thing a different way altogether, not taking side 1 or 
> 2, but rather 1+2i.

We've had a lot of good thought here, and I see this as anything but a
mindless squabble.

> Here's my synopsis of how everything's gone so far:
> 
> We have the following syntaxes for elses on loops (for any kind, not just 
> loop).
>       loop ;; {} else {}
>       loop ;; { else {} }
>       loop ;; { ELSE {} }

See the thread that Damian started, which discusses these options.

> Furthermore, we have a couple of different ways for loops to come after 
> elses:
>       elsloop ;; {}
>       else loop ;; {}
>       else { loop ;; {} }

Correct, and this has been pointed out previously in the thread. Thank
you for collecting it.

I think the reasoning for each, respectively is:

1. Consistent syntax with if/elsif/else
2. Cleaner
3. No new syntax required

I agree with all three points. I have a feeling we're not going to get
if/else if, but if we do I prefer the second. If we don't I prefer the
first.


Reply via email to