🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #407

Re: “The end of software secrecy is almost upon

#407
From: Peter Flass
Date: Wed, 28 Oct 2026 02:28
38 lines
3861 bytes
On 10/27/26 18:43, Lawrence D’Oliveiro wrote:
> On Tue, 27 Oct 2026 21:35:09 -0400, James Kuyper wrote:
> 
>> ... without the context that applies elsewhere, your comment about
>> resource allocation comes off as a non-sequitur.
> 
> That’s just an excuse. Other comments of mine, from further back in
> this particular line of this thread:
> 
> * “What if you’re building an object that needs to be returned to the
>    caller?”
> * “The principle applies to Fortran as it does to any language where
>    you have to explicitly manage storage allocations.”
> * “If you have to do cleanup at each level before exiting, then it works
>    perfectly well.”
> 
> Did you notice any of that?
> 
>  From elsewhere in the discussion:
> 
>      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.
> 
> Did you pay attention to any of that?

You could keep track of the allocations in a list (or whatever) and then 
walk thru  and clean them up at once.
Technical Details
Message-ID: <11brmkv$22lhe$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> <11b6vc4$2npqv$1@dont-email.me> <11b87jg$37b7t$1@dont-email.me> <11b884b$p2o9$1@dont-email.me> <11b94he$3hdo3$2@dont-email.me> <11b9qd6$pq4i$1@dont-email.me> <11b9r5r$3nppf$1@dont-email.me> <11baekk$3v7n1$1@dont-email.me> <11bbl4f$du80$2@dont-email.me> <11bbo58$ek3q$1@dont-email.me> <11bbqns$fe31$1@dont-email.me> <11bbron$fmi2$1@dont-email.me> <11bc09b$gsv1$1@dont-email.me> <11bd6ed$ttau$1@dont-email.me> <11bejnh$1eab6$1@dont-email.me> <11berc9$1ge43$1@dont-email.me> <11bm2kg$2d3a$1@dont-email.me> <11bm7mf$3thd$1@dont-email.me> <11bmctb$5l5h$1@dont-email.me> <11bmi1p$78mo$1@dont-email.me> <11bod1u$ugib$2@dont-email.me> <11bohmi$10aqu$2@dont-email.me> <11bqe9q$1k0hc$1@dont-email.me> <11br86k$1uehc$2@dont-email.me> <11brjgd$21rhi$1@dont-email.me> <11brk0r$21r0v$2@dont-email.me>

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: Peter Flass <Peter@Iron-Spring.com>
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, 27 Oct 2026 19:28:47 -0700
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <11brmkv$22lhe$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> <11b6vc4$2npqv$1@dont-email.me>
 <11b87jg$37b7t$1@dont-email.me> <11b884b$p2o9$1@dont-email.me>
 <11b94he$3hdo3$2@dont-email.me> <11b9qd6$pq4i$1@dont-email.me>
 <11b9r5r$3nppf$1@dont-email.me> <11baekk$3v7n1$1@dont-email.me>
 <11bbl4f$du80$2@dont-email.me> <11bbo58$ek3q$1@dont-email.me>
 <11bbqns$fe31$1@dont-email.me> <11bbron$fmi2$1@dont-email.me>
 <11bc09b$gsv1$1@dont-email.me> <11bd6ed$ttau$1@dont-email.me>
 <11bejnh$1eab6$1@dont-email.me> <11berc9$1ge43$1@dont-email.me>
 <11bm2kg$2d3a$1@dont-email.me> <11bm7mf$3thd$1@dont-email.me>
 <11bmctb$5l5h$1@dont-email.me> <11bmi1p$78mo$1@dont-email.me>
 <11bod1u$ugib$2@dont-email.me> <11bohmi$10aqu$2@dont-email.me>
 <11bqe9q$1k0hc$1@dont-email.me> <11br86k$1uehc$2@dont-email.me>
 <11brjgd$21rhi$1@dont-email.me> <11brk0r$21r0v$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 28 Oct 2026 02:28:48 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2184750"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/q7c123af+kyN7oafpBiVd"; posting-host="0508e3bb2b981592fdc4d4cda857a4ec"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:XekeLRZIXJN7rT3r8Z1bzWt8Tm8= sha256:SmLsKi6+uFYVRlDZIOxlH/J38MpjRwF6rzS3uPBd544=
	sha1:yEaQ1LpdqkPssYgbAVyJl5r2npQ= sha256:/ztRDVKYoatFf53d+hjQZuRPqyhgh8/rGTcvFx3CRMM=
Content-Language: en-US
In-Reply-To: <11brk0r$21r0v$2@dont-email.me>