Re: The fate of Euphoria
- Posted by "Kat" <gertie at visionsix.com> Nov 09, 2004
- 544 views
On 8 Nov 2004, at 10:36, Ferlin Scarborough wrote: > > > posted by: Ferlin Scarborough <ferlin1 at bellsouth.net> > > Mike Nelson wrote: > > > > > > > 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. > > > > I tend to somewhat disagree with this, CASE is a glorified If...ElseIf > statement. You are not really going anywhere, you are saying in the CASE where > this is equal to this, then do this code. Not goto this other place. Yes it does. After hitting the first valid case line, it goto's the endcase line. Same with the elsif, once a line (or block) is executed, no more of the if..elsif..end is tested, it does a goto the end if. > Your > program does not head off in some other direction it still falls through the > CASE statement to the following statement(s). Hmm, some languages must be different then. From my experience only one case is triggered (if any is), and only one elsif is triggered (if any). After that, the flow does a goto the end statement. > > 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 > > > <snip> > > -- Mike Nelson > > My biggest beef with the goto statement is that it is usally highly abused, > sometimes to the point where the program is literally unreadable, by the time > you figure out where all those jumps are going to, you could have totally > rewritten an application just like it. But if you code like that, you which to deny me the use of it, even if i use it properly? You must have voted for Bush. > We really don't want to start the goto wars of 4 or 5 years ago on here, > it tended to get pretty nasty, and ending up with each side pretty much > saying, this is my opionion and I'm sticking to it, as stuborn as I am. > > Euphoria has lastest this long without the need for a goto, and it will > survive even longer with or without it. Right now without it, the programs > are > much cleaner. Not really. I have had to make some aweful messes with Eu, and gave up and did it faster and cleaner in mirc with goto. Goto is just a program flow control, you don't haveto control your code that way if you don't wish to. But goto can replace the exit(), break(), restart(), resume(), repeat and while loops. And without goto and access to loop control vars, i stilll haveto use a "while 1 do" to make a loop i have better control over, than use a for loop. With goto, i wouldn't haveto abuse the while that way. Not in Eu, but i have had to wrap up blocks in *both* repeat-until and while-do when a single goto would have been enough. Just because you don't want to drive a hybrid car doesn't mean they should be illegal. But you don't haveto drive one. Kat