1. GOTO revisited

Hi,

I think the GOTO question is a language-specific one. In some languages
you just have to have GOTO, in others it isn't required. You cannot write
useful assembly language programs without a GOTO. For the past 10 years
I've been writing commercial software using language called PROGRESS and
doesn't even have a GOTO construct and it doesn't need one.

What PROGRESS does have though, is simple ways to leave and restart
blocks of code, for example...

BLOCK1:
repeat:

  BLOCK2:
  repeat:
    if func1() then
      leave BLOCK1.

    if func2() then
      next. /* BLOCK2 implied */

    if func3() then
      next BLOCK1.
  end.

  if func4() then
      next. /*BLOCK1 implied */
  func5().

end.


cheers,
Derek Parnell
dparnell at vic.bigpond.net.au
Melbourne, Australia

P.S. More info on PROGRESS is at http://www.progress.com

new topic     » topic index » view message » categorize

2. Re: GOTO revisited

>I think the GOTO question is a language-specific one. In some languages
>you just have to have GOTO, in others it isn't required. You cannot write
>useful assembly language programs without a GOTO. For the past 10 years
>I've been writing commercial software using language called PROGRESS and
>doesn't even have a GOTO construct and it doesn't need one.

Haha, I know languages, where preciously the same 'tricks' were called
"structured goto's"
And indeed, this is the way I would want Euphoria to handle it.
No loose pointer, etc.

But indeed I would prefer not to call them goto's. Not becuz they are or are
not (I could care less about that), but due to the number of people
emotionally unable to accept any mechanism containing the letters 'goto' in
its name. We all have our own trauma's with Basic and goto's. And like all
other trauma's, once you are able to accept them and handle them, you're a
much stronger person, or better programmer. However, this doesnt make
everything basic did bad, and everthing euphoria does right. In some areas
they are much alike, in many areas basic should be as Euphoria, and in a few
areas Euphoria should be more like basic..

[Nice example of 'Progress' has been cut]

Ralf

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu