On Mon, 2002-05-06 at 14:21, David Whipp wrote: > Miko O'Sullivan [mailto:[EMAIL PROTECTED]] wrote: > > Sorry, I thought I'd expressed agreement at some point. I like the > > "else\s+(if|while|for|loop)" construct very much, and I think the > > programmers of the world would like it too. I know a some people have > > issues with "where's the if" but it's no worse than "where's > > the semicolon" or "where's the filehandle closed". > > Is this the same as saying that C<else> can be followed by > *any* statement? If not, then we would need user-defined > control statements (a property on a sub?) that can be used > in the "else" context.
No. That would introduce a problem that Larry has said (back when I started learning perl 3.x) that he wanted to avoid from C: the mystery of bare-blocks. What I was proposing was that else could be followed by a block (as normal) or by a whole control structure, which could be a loop or conditional and might itself contain an else. There's no ambiguity because all blocks still require braces.