🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #60

Re: “The end of software secrecy is almost upon

#60
From: Lawrence D’Oliveiro
Date: Tue, 20 Oct 2026 20:00
18 lines
2311 bytes
On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:

> The undisciplined use of GOTOs is bad, agreed.

Is there such a thing as a *disciplined* use of gotos?

I find the C code I write tends to do a lot of dynamic resource
allocations. These can sometimes fail with errors. So error recovery
will invariably involve cleaning up those parts of the allocations
which already succeeded. Gotos are no good for this; you need to exit
levels of structure nesting one by one, disposing of allocations as
you go.

I put together an example here
<https://gitlab.com/ldo/a_structured_discipline_of_programming>. This
is an extension module that offers services to Python code, because
that is just about the worst example I could think of, for those who
think gotos can cut it.
Technical Details
Message-ID: <11b8h83$3b48o$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11amvre$15far$1@dont-email.me> <11b5tdb$2cs5l$1@dont-email.me> <11b64cp$end$1@panix2.panix.com> <11b64hj$2faos$1@dont-email.me> <11b679m$6dl$1@panix2.panix.com> <11b6u68$2neta$1@dont-email.me> <11b6v90$2nine$3@dont-email.me> <11b87t8$379mv$1@dont-email.me> <11b8b2k$p44i$1@dont-email.me> <rXOBS.7015$5Iy.3911@fx04.iad>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D’Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.fortran,comp.lang.c++,alt.comp.lang.rust,alt.folklore.computers
Subject: Re: “The end of software secrecy is almost upon
Date: Tue, 20 Oct 2026 20:00:03 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <11b8h83$3b48o$1@dont-email.me>
References: <11amvre$15far$1@dont-email.me> <11b5tdb$2cs5l$1@dont-email.me>
	<11b64cp$end$1@panix2.panix.com> <11b64hj$2faos$1@dont-email.me>
	<11b679m$6dl$1@panix2.panix.com> <11b6u68$2neta$1@dont-email.me>
	<11b6v90$2nine$3@dont-email.me> <11b87t8$379mv$1@dont-email.me>
	<11b8b2k$p44i$1@dont-email.me> <rXOBS.7015$5Iy.3911@fx04.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 20 Oct 2026 20:00:04 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3510552"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18wFwVTZRCRH31FyMqRoti8"; posting-host="bb545ab4c326d2444d7ace2ad38ea6bc"
User-Agent: Pan/0.165 (Kostiantynivka)
Cancel-Lock: sha1:smOYk1AsPvRw2U+s+LYTcV16Iwk= sha256:DDynmBIrq3q0MOFVEKUNQ/HItBJvfkDsKrYP3rlmy3I=
	sha1:48gQwE/q4q+IIh42VTAQIS0hvE0= sha256:kyJm+TrSbQkVNkFkHwZwfoEKGMwHJ+aenHio3IKtlb8=