t***@engmail.uwaterloo.ca
2004-07-01 18:36:34 UTC
The change made to resolve the issues surrounding SL else blocks was the
addition of the sentence "The first statement of an else clause cannot be a
new if statement." to the SL spec. This seems to me to disallow the following
code:
if ... then
... # some code
else
if ... then
... # some code
endif;
... # some code
endif;
The first statement of the else clause here is a new if statement, but it's
followed by additional code. If this is disallowed, I don't see any way for
the programmer to convert such code to equally efficient permissible code.
Wouldn't it be better to say "The entire body of an else clause may not be a
single new if statement."? Or would that not have fixed the problem at all?
----------------------------------------
This mail sent through www.mywaterloo.ca
addition of the sentence "The first statement of an else clause cannot be a
new if statement." to the SL spec. This seems to me to disallow the following
code:
if ... then
... # some code
else
if ... then
... # some code
endif;
... # some code
endif;
The first statement of the else clause here is a new if statement, but it's
followed by additional code. If this is disallowed, I don't see any way for
the programmer to convert such code to equally efficient permissible code.
Wouldn't it be better to say "The entire body of an else clause may not be a
single new if statement."? Or would that not have fixed the problem at all?
----------------------------------------
This mail sent through www.mywaterloo.ca