On Tue, Apr 24, 2007 at 06:45:12PM -0400, Charles Bailey wrote: : On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : >Note that unless no longer allows an else : It's probably that I'm just having another day where skull > brain, but I'm : not sure I see the benefit to the language here. : : I think of "unless" as an alternate spelling for "if not", so it seems : natural that it be possible to follow it with an "else". I'll grant that : the (common) idiomatic usage of "unless" doesn't include an "else", but that : seems more an argument not to use an "else" rather than to forbid it. It's : a bit like saying one can "continue" after a "while" but not an "until". : : Is there a parsing advantage that I've missed, or does it disambiguate some : other construct?
Yes, it's slightly easier to parse this way, and yes, it bugs me that unless/else is not English, but mostly I changed it as a not-so-gentle prod towards refactoring, based on the notion that if you have to install a guard on a storage location being false, you've probably got the scope of the storage location wrong. And even if not, there are several other ways to write it, at least one of which will be generally more readable to other people. I freely admit that it's less orthogonal and that I'm being high-handed. :) Larry