Deutsch   English   Français   Italiano  
<861pxrd8c8.fsf@linuxsc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!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>
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=
Bytes: 2562

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.