Re: Optional "then" and "do"
- Posted by Matt Lewis <matthewwalkerlewis at ?mail.?om> May 15, 2008
- 992 views
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