Re: voting on GOTO

new topic     » goto parent     » topic index » view thread      » older message » newer message

Larry Miller wrote:
> 
> As long term users of this forum will be well aware, Robert Craig was opposed
> to the introduction of goto into Euphoria. If this should ever happen I can
> imagine what his initial reaction might be:
> 
> "WHAT HAVE THEY DONE TO MY BABY?"

Almost ... here is his response ...

----------------------
I vote No.
 
I don't want to now have to spend a couple of seconds
scanning the source code for each routine (and top-level),
checking for possible GOTO's or labels, every time I pick up
someone else's Euphoria code. I like being absolutely safe
in the knowledge that there can't be any.
 
e.g. to understand the control flow of any large block of code
containing:
 
     .... dozens of lines of code, running more than one screen
     .... but are there any GOTO's or labels in here?
     .... I guess I now have to scan it all to be certain I understand
     .... the flow of control
 
e.g.
      while x do
           Hmmm. I *used to* understand the possible
           ways that control flow
           could exit out of a while loop, but ...
           (... any GOTO's or labels in here?)
          < big chunk of messy code >
      end while
 
      for i ... do
          <big chunk of code>
          any GOTO's ?
          any labels?
          can I even be sure the loop var has been initialized? No.
      end for
 
      if x then -- used to look straightforward, but now ...?
          <big chunk of code>
          any GOTO's?
          any labels?
      else
          <big chunk of code>
          any GOTO's?
          any labels?
      end if
 
The arrangement was, that the developers
would not release any major feature without the
regular EUforum participants hearing exactly
what the proposed change is, and having their chance to
vote yes/no. Many contented users pay little attention to
discussions on EUforum, until they hear that a
significant change, requiring their vote, is possibly coming.
 
Note: I am just casting one vote against.
If the majority of EUforum + developers
wants GOTO, then that's fine with me.
 
Other than Kat, it didn't sound like anyone
had any urgent personal desire to use GOTO,
they just philosophically believed in letting
the other guy use it if he wished.
 
The implementation of GOTO should not be too hard,
but you might want to check for any assumptions
that I may have made regarding optimizing basic blocks,
especially in the Translator.
 
There are lots of language "features" that could
be easily added. That does not mean they should be added.
The test, especially for core statements in the language,
should not be: Would this provide some convenience
to some user in some situation?
 
I realize that I will not be forced to ever personally use GOTO,
but I will be forced to be aware that other people's code,
that I am trying to understand, *might* contain a GOTO.
 
Once you add a new core language statement, and it starts being used,
it will be virtually impossible to ever remove it.
Someone will have to maintain it forever,
even if it complicates other, possibly better
features and internal optimizations that might come along.
 
Regards,
    Rob Craig
    Rapid Deployment Software
    http://www.RapidEuphoria.com
-------------------

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu