Say what?


I keep changing my mind whether
C/C++ is a blessing or a cruel joke on us all. Sometimes I think it’s great (when
it lets me cast a block of memory to just about anything I want), and sometimes I
really hate it(when it lets me cast a block of memory to just about anything I want). And
sometimes, I come across something that makes my jaw drop again. 

Nothing new - just another
confirmation that C is just full of warts of many kinds.

This time I was reading Eric
Lippert’s entry on exceptions
… yeah.  What do you think about
this:

 

jmp_buf env;

            int i
= 0;

            if (
setjmp( env ) <=100 )

            {

                        i++;

                        printf(
“%d\r\n”, i );

                        longjmp(
env, i );

            }



Newsflash: that’s
a loop
. Using ABBA‘s
words, I wonder should laugh
or cry