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


Groups > comp.lang.c > #389822

Re: goto considered helpful (Was: question about linker)

Path csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: goto considered helpful (Was: question about linker)
Date Sat, 28 Dec 2024 09:29:43 -0800
Organization A noiseless patient Spider
Lines 23
Message-ID <861pxrd8c8.fsf@linuxsc.com> (permalink)
References <vj7dup$he7i$1@dont-email.me> <vjasuj$17uod$1@dont-email.me> <vjc87h$1apid$1@paganini.bofh.team> <vjcbe1$1jns0$1@dont-email.me> <87wmg5x4b1.fsf@nosuchdomain.example.com> <vjd96b$1pbed$1@dont-email.me> <87jzc5wx3s.fsf@nosuchdomain.example.com> <vjdde8$1q2to$2@dont-email.me> <87frmtwuzq.fsf@nosuchdomain.example.com> <20241212144454.00003b83@yahoo.com> <aqpamjh4h4kmu34ilbe5bnsiq4o7llso06@4ax.com> <20241220152722.00000327@yahoo.com> <86pllhc8q0.fsf@linuxsc.com> <tqiqmj1v0fu3hnbgsfn6gh3sl1lv5e25cf@4ax.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Date Sat, 28 Dec 2024 18:29:43 +0100 (CET)
Injection-Info dont-email.me; posting-host="faac763533e698875b92b0b3d2af3e2e"; logging-data="465100"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RSfObdczLym06Aja05eM7dQkvK1LthZo="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:zqPUN1B1nwAt+UM00xMuudTi1QA= sha1:l9QfEjlV9FegD+b028Au7eov56A=
Xref csiph.com comp.lang.c:389822

Show key headers only | View raw


Rosario19 <Ros@invalid.invalid> writes:

> On Tue, 24 Dec 2024 09:05:27 -0800, Tim Rentsch <> wrote:
>
>> In my view using goto should always be done on a case-by-case basis
>> and not under any general rule.  More specifically, when first
>> writing a function it should be written without using goto (which is
>> always possible).  If something about the code feels off, write it
>> another way, still without using goto.  Continue re-writing in this
>> way as long as the results are dissatisfying, up to perhaps four or
>> five versions (in some cases I have done a lot more than that).  In
>> many cases function bodies start off too large, and the code can be
>> simplified and clarified by breaking a function into several smaller
>> sub-functions;  doing that often removes any sense that goto is
>> needed.
>
> in my vew
> goto it is needed because all that high level language is traslated in
> the end, in easy istructions that use goto

Goto is never necessary.  I have used at least three programming
languages that didn't have goto at all.  And that's not counting
unusual languages like Prolog.

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


Thread

Re: question about linker Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-12-05 12:39 -0800
  Re: question about linker Bart <bc@freeuk.com> - 2024-12-05 21:34 +0000
    Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-05 16:50 -0800
      Re: question about linker Bart <bc@freeuk.com> - 2024-12-06 01:20 +0000
        Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-05 18:10 -0800
          Re: question about linker Bart <bc@freeuk.com> - 2024-12-06 11:34 +0000
            Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-06 10:14 -0800
            Re: question about linker Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-12-07 07:00 -0800
              Re: question about linker Bart <bc@freeuk.com> - 2024-12-07 16:17 +0000
        Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-07 12:34 +0100
          Re: question about linker Bart <bc@freeuk.com> - 2024-12-07 13:04 +0000
            Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-07 15:36 +0100
              Re: question about linker Bart <bc@freeuk.com> - 2024-12-07 15:33 +0000
                Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-07 13:38 -0800
                Re: question about linker Bart <bc@freeuk.com> - 2024-12-07 22:47 +0000
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-09 19:46 +0100
                Re: question about linker bart <bc@freeuk.com> - 2024-12-11 02:21 +0000
                Re: question about linker antispam@fricas.org (Waldek Hebisch) - 2024-12-11 14:39 +0000
                Re: question about linker bart <bc@freeuk.com> - 2024-12-11 15:34 +0000
                Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-11 14:06 -0800
                Re: question about linker bart <bc@freeuk.com> - 2024-12-12 00:02 +0000
                Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-11 16:42 -0800
                Re: question about linker bart <bc@freeuk.com> - 2024-12-12 01:14 +0000
                Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-11 17:27 -0800
                Re: question about linker bart <bc@freeuk.com> - 2024-12-12 11:48 +0000
                Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-12 12:50 -0800
                goto considered helpful (Was: question about linker) Michael S <already5chosen@yahoo.com> - 2024-12-12 14:44 +0200
                Re: goto considered helpful Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-12 13:50 -0800
                Re: goto considered helpful Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-12 22:33 +0000
                Re: goto considered helpful David Brown <david.brown@hesbynett.no> - 2024-12-13 09:50 +0100
                Re: goto considered helpful bart <bc@freeuk.com> - 2024-12-13 11:12 +0000
                Re: goto considered helpful Michael S <already5chosen@yahoo.com> - 2024-12-13 14:39 +0200
                Re: goto considered helpful David Brown <david.brown@hesbynett.no> - 2024-12-13 14:31 +0100
                Re: goto considered helpful David Brown <david.brown@hesbynett.no> - 2024-12-13 14:19 +0100
                Re: goto considered helpful bart <bc@freeuk.com> - 2024-12-13 14:26 +0000
                Re: goto considered helpful David Brown <david.brown@hesbynett.no> - 2024-12-13 17:52 +0100
                Re: goto considered helpful Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-13 10:11 -0800
                Re: goto considered helpful scott@slp53.sl.home (Scott Lurndal) - 2024-12-13 14:16 +0000
                Re: goto considered helpful Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-13 14:50 +0100
                Re: goto considered helpful (Was: question about linker) Rosario19 <Ros@invalid.invalid> - 2024-12-20 13:52 +0100
                Re: goto considered helpful (Was: question about linker) Michael S <already5chosen@yahoo.com> - 2024-12-20 15:27 +0200
                Re: goto considered helpful (Was: question about linker) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-12-24 09:05 -0800
                Re: goto considered helpful (Was: question about linker) Rosario19 <Ros@invalid.invalid> - 2024-12-26 13:33 +0100
                Re: goto considered helpful (Was: question about linker) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-12-28 09:29 -0800
                Re: question about linker Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-12-12 06:54 -0800
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-11 17:24 +0100
                Re: question about linker bart <bc@freeuk.com> - 2024-12-12 12:11 +0000
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-12 15:56 +0100
                Re: question about linker Ike Naar <ike@sdf.org> - 2024-12-11 08:43 +0000
                Re: question about linker David Brown <david.brown@hesbynett.no> - 2024-12-11 16:28 +0100
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-11 17:46 +0100
                Re: question about linker antispam@fricas.org (Waldek Hebisch) - 2024-12-12 02:31 +0000
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-11 17:30 +0100
                Re: question about linker David Brown <david.brown@hesbynett.no> - 2024-12-11 17:47 +0100
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-11 17:51 +0100
                Re: question about linker bart <bc@freeuk.com> - 2024-12-11 17:20 +0000
                Re: question about linker David Brown <david.brown@hesbynett.no> - 2024-12-11 21:46 +0100
                Re: question about linker bart <bc@freeuk.com> - 2024-12-11 21:19 +0000
                Re: question about linker Michael S <already5chosen@yahoo.com> - 2024-12-12 00:03 +0200
                Re: question about linker David Brown <david.brown@hesbynett.no> - 2024-12-12 11:08 +0100
                Re: question about linker Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-12-23 16:02 -0800
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-12 05:50 +0100
                Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-11 21:35 -0800
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-12 12:38 +0100
                Re: question about linker James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-12-18 16:04 -0500
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-19 01:35 +0100
                Re: question about linker James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-12-19 06:39 -0500
                Re: question about linker antispam@fricas.org (Waldek Hebisch) - 2024-12-19 14:58 +0000
                Re: question about linker bart <bc@freeuk.com> - 2024-12-12 12:29 +0000
                Re: question about linker Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-12-12 07:01 -0800
                Re: question about linker David Brown <david.brown@hesbynett.no> - 2024-12-11 21:36 +0100
                Re: question about linker antispam@fricas.org (Waldek Hebisch) - 2024-12-11 13:59 +0000
            Re: question about linker Bart <bc@freeuk.com> - 2024-12-07 14:57 +0000
              Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-07 16:19 +0100
                Re: question about linker Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-07 16:28 +0100
              Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-07 13:44 -0800
                Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-07 13:58 -0800
                Re: question about linker scott@slp53.sl.home (Scott Lurndal) - 2024-12-07 22:15 +0000
            Re: question about linker antispam@fricas.org (Waldek Hebisch) - 2024-12-11 22:51 +0000
              Re: question about linker Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-11 15:12 -0800
              Re: question about linker bart <bc@freeuk.com> - 2024-12-12 00:52 +0000
    Re: question about linker Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-12-07 06:38 -0800

csiph-web