Re: The fate of Euphoria
- Posted by "Mike Nelson" <MichaelANelson at worldnet.att.net> Nov 08, 2004
- 536 views
> > PS CASE is very good, better than a bunch of elsifs. > > It's another goto in disguise. So is the elsif, for that matter. Picture the little > goto at the end of each elsif that executes in that stack of if-elsif-end, where > the goto points to the end of the stack. On the assembly language level, yes it is. That is of no concern to the programmer, however. This code if x then do_1() elsif y then do_2() else do_3() end if or the equivalent case statements simply do not have the same power or potential for abuse as goto: if x then goto skip end if --- 50 other statements : skip -- 100 other statements If you prefer, elsif is a constrained goto, while goto itself is unconstrained, hence more powerful and more dangerous. By the way, I program professionally in VB6 which leaves me no choice but to use goto for error handlers. And I also use it occasionally when not strictly required, as I find it convenient in some cases (Always error or special case handling, 99% of the time in place of the non-available continue.) I never really miss it in Eu. I would use continue if it were available--continue is a constrained goto. -- Mike Nelson