Re: Optional "then" and "do"

new topic     » goto parent     » topic index » view thread      » older message » newer message

yuku wrote:
> 
> Salix wrote:
> > But if I tend to forget "and". The result now is
> > 
> > }}}
<eucode>
> > if apple=1 bananas=3 then peach=7 end if
> > </eucode>
{{{

> > 
> > With optional "then" it would be
> > 
> > }}}
<eucode>
> > if apple=1 bananas=3 peach=7 end if
> > </eucode>
{{{

> > 
> > that is much harder to track down.
> 
> You can always write the "then" if you want. 
> Especially in such one-line if. 
> 
> Reason of making it optional is that it reduces the mental load of 
> remembering the correct delimiter for every if, for and while statement.

I argue that this mental load is dwarfed by the mental load required for
maintenance.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu