[Nickle]Boolean type, twixt, static vs global, built-in profiling
Keith Packard
nickle@nickle.org
Mon, 29 Jul 2002 18:37:15 -0700
Around 12 o'clock on Jul 29, Bart Massey wrote:
> Also, while I'm at it, you were going to make else
> syntactically independent of if, so that we could get rid of
> that stupid extra semicolon at top level interactive. Any
> reason not to do this?
Yes, I discovered the reason not to do this:
if ((int i = foo ()) == 0)
printf ("i is zero\n");
else
printf ("i is %d\n", i);
When 'if' and 'else' are separate statements, I loose the if namespace at
the end of that statement so that the else block can't see variables
declared within the scope of the conditional. Fixing this would be
tricky...
-keith