Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.fortran > #41009

Re: Is goto Still Considered Harmful?

From Richard <rgrdev_@gmail.com>
Newsgroups comp.lang.fortran, comp.lang.c
Subject Re: Is goto Still Considered Harmful?
Date 2014-03-19 17:05 +0100
Organization http://www.ieee.org/
Message-ID <8738ienphl.fsf@gmail.com> (permalink)
References (2 earlier) <lgadtp$9s0$1@dont-email.me> <2kohi99ifn8opluhqi8rovcp59n050hu00@4ax.com> <lgbvcl$tca$1@dont-email.me> <vNfWu.64226$Uh7.61147@fx28.am4> <5329A488.9070105@verizon.net>

Cross-posted to 2 groups.

Show all headers | View raw


James Kuyper <jameskuyper@verizon.net> writes:

> On 03/19/2014 08:08 AM, BartC wrote:
>> "James Kuyper" <jameskuyper@verizon.net> wrote in message 
>> news:lgbvcl$tca$1@dont-email.me...
> ...
>>> I would guess that "whenever I get a chance" refers to when maintenance
>>> is needed for other reasons; that's the same rule I use when determining
>>> whether to make stylistic improvements to working code. And it's pretty
>>> plausible that any code that old is indeed difficult to maintain because
>>> of its spaghetti shape.
>> 
>> If it really was spaghetti code, then yes.
>> 
>> But if the gotos were used sensibly to construct missing control
>> statements, 

Idiots will tell you that's not possible. As someone with years
assembler not only is it done, it must be done or, yes, its hard to maintain.

>
> Such code can still be hard to maintain - there's a legitimate reason
> why those control statements were added to later versions of Fortran.

Its just as hard if not harder to keep in your head the multiple ways a
function can fall through to a single return statement. It's nonsense to
insist on one return statement.

if(c) then {
      prepare_stuff(;
      return INITIAL_SETUP_COMPLETE;
}else if(d){
      return ALREADY_DONE
}

return BLAH;

Simple but sometimes we need to keep it simply. A lot of time
maintaining live code bases we need to step through code and explicit
returns like that make it a LOT simpler to follow.

Too much theory over practice with no reference to real development and
maintenance tools makes a pretty shitty and useless team member.

-- 
"Avoid hyperbole at all costs, its the most destructive argument on
the planet" - Mark McIntyre in comp.lang.c

Back to comp.lang.fortran | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Is goto Still Considered Harmful? Lynn McGuire <lmc@winsim.com> - 2014-03-12 11:02 -0500
  Re: Is goto Still Considered Harmful? James Kuyper <jameskuyper@verizon.net> - 2014-03-12 12:17 -0400
  Re: Is goto Still Considered Harmful? nospam@see.signature (Richard Maine) - 2014-03-12 09:20 -0700
    Re: Is goto Still Considered Harmful? Lynn McGuire <lmc@winsim.com> - 2014-03-18 16:30 -0500
      Re: Is goto Still Considered Harmful? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-03-18 21:48 +0000
        Re: Is goto Still Considered Harmful? Lynn McGuire <lmc@winsim.com> - 2014-03-18 19:10 -0500
          Re: Is goto Still Considered Harmful? "Terence" <tbwright@bigpond.net.au> - 2014-03-19 20:39 +1100
          Re: Is goto Still Considered Harmful? ftinetti@gmail.com - 2014-03-19 03:41 -0700
      Re: Is goto Still Considered Harmful? ftinetti@gmail.com - 2014-03-18 16:45 -0700
      Re: Is goto Still Considered Harmful? dpb <none@non.net> - 2014-03-18 19:14 -0500
      Re: Is goto Still Considered Harmful? Geoff <geoff@invalid.invalid> - 2014-03-18 17:36 -0700
        Re: Is goto Still Considered Harmful? James Kuyper <jameskuyper@verizon.net> - 2014-03-19 07:34 -0400
          Re: Is goto Still Considered Harmful? "BartC" <bc@freeuk.com> - 2014-03-19 12:08 +0000
            Re: Is goto Still Considered Harmful? James Kuyper <jameskuyper@verizon.net> - 2014-03-19 10:07 -0400
              Re: Is goto Still Considered Harmful? Richard <rgrdev_@gmail.com> - 2014-03-19 17:05 +0100
            Re: Is goto Still Considered Harmful? Lynn McGuire <lmc@winsim.com> - 2014-03-19 12:27 -0500
              Re: Is goto Still Considered Harmful? dpb <none@non.net> - 2014-03-19 13:04 -0500
                Re: Is goto Still Considered Harmful? dpb <none@non.net> - 2014-03-19 13:26 -0500
                Re: Is goto Still Considered Harmful? Lynn McGuire <lmc@winsim.com> - 2014-03-19 13:36 -0500
                Re: Is goto Still Considered Harmful? dpb <none@non.net> - 2014-03-19 14:02 -0500
                Re: Is goto Still Considered Harmful? Lynn McGuire <lmc@winsim.com> - 2014-03-19 13:36 -0500
              Re: Is goto Still Considered Harmful? Gordon Sande <Gordon.Sande@gmail.com> - 2014-03-19 16:48 -0300
      Re: Is goto Still Considered Harmful? "Terence" <tbwright@bigpond.net.au> - 2014-03-19 20:35 +1100
        Re: Is goto Still Considered Harmful? Lynn McGuire <lmc@winsim.com> - 2014-03-19 12:26 -0500
  Re: Is goto Still Considered Harmful? Gordon Sande <Gordon.Sande@gmail.com> - 2014-03-12 13:23 -0300
    Re: Is goto Still Considered Harmful? e p chandler <epc8@juno.com> - 2014-03-12 10:05 -0700
  Re: Is goto Still Considered Harmful? Kaz Kylheku <kaz@kylheku.com> - 2014-03-12 16:47 +0000
  Re: Is goto Still Considered Harmful? "BartC" <bc@freeuk.com> - 2014-03-12 18:50 +0000
    Re: Is goto Still Considered Harmful? Gordon Sande <Gordon.Sande@gmail.com> - 2014-03-12 16:16 -0300
    Re: Is goto Still Considered Harmful? <william@wilbur.25thandClement.com> - 2014-03-12 12:49 -0700
    Re: Is goto Still Considered Harmful? "Qolin" <noone@nowhere.com> - 2014-03-12 21:54 +0000
      Re: Is goto Still Considered Harmful? Lynn McGuire <lmc@winsim.com> - 2014-03-12 16:57 -0500
        Re: Is goto Still Considered Harmful? "Qolin" <noone@nowhere.com> - 2014-03-12 22:00 +0000
          Re: Is goto Still Considered Harmful? John Harper <john.harper@vuw.ac.nz> - 2014-03-13 11:23 +1300
      Re: Is goto Still Considered Harmful? Keith Thompson <kst-u@mib.org> - 2014-03-12 15:36 -0700
      Re: Is goto Still Considered Harmful? Robert Wessel <robertwessel2@yahoo.com> - 2014-03-12 23:40 -0500
        Re: Is goto Still Considered Harmful? David Brown <david.brown@hesbynett.no> - 2014-03-13 11:25 +0100
        Re: Is goto Still Considered Harmful? Thomas Jahns <jahns@idontlikespam.dkrz.de> - 2014-03-14 11:24 +0100
          Re: Is goto Still Considered Harmful? Robert Wessel <robertwessel2@yahoo.com> - 2014-03-14 23:32 -0500
          Re: Is goto Still Considered Harmful? Dr Nick <nospam-4@temporary-address.org.uk> - 2014-03-15 13:43 +0000
            Re: Is goto Still Considered Harmful? David Brown <david.brown@hesbynett.no> - 2014-03-15 16:28 +0100
              Re: Is goto Still Considered Harmful? Dr Nick <nospam-4@temporary-address.org.uk> - 2014-03-15 16:01 +0000
                Re: Is goto Still Considered Harmful? David Brown <david.brown@hesbynett.no> - 2014-03-17 08:51 +0100
    Re: Is goto Still Considered Harmful? David Brown <david.brown@hesbynett.no> - 2014-03-13 11:22 +0100
  Re: Is goto Still Considered Harmful? Jake <thatcadguy@gmail.com> - 2014-03-12 12:25 -0700
  Re: Is goto Still Considered Harmful? ralph <nt_consulting@yahoo.com> - 2014-03-12 15:34 -0500
  Re: Is goto Still Considered Harmful? jt@toerring.de (Jens Thoms Toerring) - 2014-03-13 01:06 +0000
    Re: Is goto Still Considered Harmful? fj <francois.jacq@irsn.fr> - 2014-03-12 18:31 -0700
      Re: Is goto Still Considered Harmful? wclodius@earthlink.net (William Clodius) - 2014-03-12 21:08 -0600
        Re: Is goto Still Considered Harmful? Dick Hendrickson <dick.hendrickson@att.net> - 2014-03-13 10:54 -0500
          Re: Is goto Still Considered Harmful? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-03-13 19:53 +0000
            Re: Is goto Still Considered Harmful? "Qolin" <noone@nowhere.com> - 2014-03-13 20:16 +0000
          Re: Is goto Still Considered Harmful? wclodius@earthlink.net (William Clodius) - 2014-03-13 21:57 -0600
    Re: Is goto Still Considered Harmful? wilson <winslole@udayton.edu> - 2014-03-13 03:59 -0400
      Re: Is goto Still Considered Harmful? wilson <winslole@udayton.edu> - 2014-03-13 05:02 -0400
    Re: Is goto Still Considered Harmful? Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2014-03-13 07:42 -0600
      Re: Is goto Still Considered Harmful? Richard <rgrdev_@gmail.com> - 2014-03-13 14:56 +0100
  Re: Is goto Still Considered Harmful? robin.vowels@gmail.com - 2014-03-13 00:59 -0700
  Re: Is goto Still Considered Harmful? Wolfgang Kilian <kilian@invalid.com> - 2014-03-13 09:10 +0100
  Re: Is goto Still Considered Harmful? Thomas Koenig <tkoenig@netcologne.de> - 2014-03-13 21:09 +0000
    Re: Is goto Still Considered Harmful? "Qolin" <noone@nowhere.com> - 2014-03-13 21:24 +0000
      Re: Is goto Still Considered Harmful? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-03-13 22:36 +0000
        Re: Is goto Still Considered Harmful? nospam@see.signature (Richard Maine) - 2014-03-13 17:54 -0700
          Re: Is goto Still Considered Harmful? robert.corbett@oracle.com - 2014-03-13 23:43 -0700
        Re: Is goto Still Considered Harmful? robin.vowels@gmail.com - 2014-03-13 18:07 -0700
        Re: Is goto Still Considered Harmful? Robert Wessel <robertwessel2@yahoo.com> - 2014-03-13 23:02 -0500
          Re: Is goto Still Considered Harmful? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-03-14 04:07 +0000
            Re: Is goto Still Considered Harmful? Robert Wessel <robertwessel2@yahoo.com> - 2014-03-13 23:56 -0500
          Re: Is goto Still Considered Harmful? helbig@astro.multiCLOTHESvax.de (Phillip Helbig---undress to reply) - 2014-03-14 09:17 +0000
        Re: Is goto Still Considered Harmful? Thomas Koenig <tkoenig@netcologne.de> - 2014-03-15 11:57 +0000
          Re: Is goto Still Considered Harmful? wclodius@earthlink.net (William Clodius) - 2014-03-15 16:38 -0600
            Re: Is goto Still Considered Harmful? Gary Scott <garylscott@sbcglobal.net> - 2014-03-15 18:09 -0500
              Re: Is goto Still Considered Harmful? wclodius@earthlink.net (William Clodius) - 2014-03-15 19:57 -0600
                Re: Is goto Still Considered Harmful? nospam@see.signature (Richard Maine) - 2014-03-15 19:41 -0700
    Re: Is goto Still Considered Harmful? Kaz Kylheku <kaz@kylheku.com> - 2014-03-13 22:42 +0000
      Re: Is goto Still Considered Harmful? "James Van Buskirk" <not_valid@comcast.net> - 2014-03-13 17:13 -0600
        Re: Is goto Still Considered Harmful? Keith Thompson <kst-u@mib.org> - 2014-03-13 16:46 -0700
          Re: Is goto Still Considered Harmful? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-03-14 01:17 +0000
            Re: Is goto Still Considered Harmful? Robert Wessel <robertwessel2@yahoo.com> - 2014-03-13 23:04 -0500
              Re: Is goto Still Considered Harmful? David Brown <david.brown@hesbynett.no> - 2014-03-14 10:41 +0100
                Re: Is goto Still Considered Harmful? Kaz Kylheku <kaz@kylheku.com> - 2014-03-14 09:55 +0000
                Re: Is goto Still Considered Harmful? David Brown <david.brown@hesbynett.no> - 2014-03-14 13:16 +0100
                Re: Is goto Still Considered Harmful? Seebs <usenet-nospam@seebs.net> - 2014-03-18 21:08 +0000
                Re: Is goto Still Considered Harmful? James Kuyper <jameskuyper@verizon.net> - 2014-03-18 17:41 -0400
            Re: Is goto Still Considered Harmful? robin.vowels@gmail.com - 2014-03-20 03:55 -0700
        Re: Is goto Still Considered Harmful? Kaz Kylheku <kaz@kylheku.com> - 2014-03-14 00:45 +0000
          Re: Is goto Still Considered Harmful? "James Van Buskirk" <not_valid@comcast.net> - 2014-03-13 21:40 -0600
            Re: Is goto Still Considered Harmful? James Kuyper <jameskuyper@verizon.net> - 2014-03-14 01:02 -0400
              Re: Is goto Still Considered Harmful? "James Van Buskirk" <not_valid@comcast.net> - 2014-03-14 10:36 -0600
                Re: Is goto Still Considered Harmful? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-14 17:30 +0000
                Re: Is goto Still Considered Harmful? James Kuyper <jameskuyper@verizon.net> - 2014-03-14 13:51 -0400
                Re: Is goto Still Considered Harmful? Keith Thompson <kst-u@mib.org> - 2014-03-14 13:12 -0700
            Re: Is goto Still Considered Harmful? Kaz Kylheku <kaz@kylheku.com> - 2014-03-14 05:29 +0000
              Re: Is goto Still Considered Harmful? "James Van Buskirk" <not_valid@comcast.net> - 2014-03-14 10:47 -0600
                Re: Is goto Still Considered Harmful? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-14 17:43 +0000
                Re: Is goto Still Considered Harmful? James Kuyper <jameskuyper@verizon.net> - 2014-03-14 13:52 -0400
            Re: Is goto Still Considered Harmful? Stephen Sprunk <stephen@sprunk.org> - 2014-03-16 17:15 -0500
              Re: Is goto Still Considered Harmful? Keith Thompson <kst-u@mib.org> - 2014-03-16 16:04 -0700
    Re: Is goto Still Considered Harmful? Kaz Kylheku <kaz@kylheku.com> - 2014-03-14 05:11 +0000
  Re: Is goto Still Considered Harmful? "Terence" <tbwright@bigpond.net.au> - 2014-03-14 08:32 +1100
    Re: Is goto Still Considered Harmful? Richard Damon <Richard@Damon-Family.org> - 2014-03-14 23:10 -0400

csiph-web