Article View: comp.lang.c++
Article #118Re: “The end of software secrecy is almost upon
From: Charlie Gibbs
Date: Wed, 21 Oct 2026 03:22
Date: Wed, 21 Oct 2026 03:22
28 lines
2863 bytes
2863 bytes
On 2026-10-21, Lawrence D’Oliveiro <ldo@nz.invalid> wrote: > On Tue, 20 Oct 2026 23:18:44 GMT, Charlie Gibbs wrote: > >> I know that a lot of CS types are going to stick pins into little >> dolls that look like me for saying this, but IMHO resource pointers, >> handles, etc. should be global. > > Surely any variable which is only used locally to a particular block > should be declared local to that block. Why should resource pointers > be any different? Many resource pointers aren't local, though. Consider a program which loads a table from a file, then uses it for lookups while processing data in another file. You might decompose the program into a function that loads the table, and another that performs lookups. The main routine calls the table load routine, and opens the file to be processed. It then loops reading records, calling the lookup function each time. The table, dynamically allocated by the table load function, must remain allocated when the allocator exits, and must be available to the lookup function on each call; it cannot be local to either of those functions. -- /~\ Charlie Gibbs | In this world there are \ / <cgibbs@kltpzyxm.invalid> | two kinds of people: X I'm really at ac.dekanfrus | 1. Those who can extrapolate / \ if you read it the right way. | from incomplete data.
Technical Details
Message-ID:
<EdWBS.93422$TYg.8089@fx21.iad>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!69.80.99.15.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx21.iad.POSTED!not-for-mailReferences:
<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> <11b8h83$3b48o$1@dont-email.me> <oFSBS.93666$Q3f.6740@fx05.iad> <11b94e3$3hdo3$1@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!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!69.80.99.15.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx21.iad.POSTED!not-for-mail Newsgroups: comp.lang.fortran,comp.lang.c++,alt.comp.lang.rust,alt.folklore.computers From: Charlie Gibbs <cgibbs@kltpzyxm.invalid> Subject: Re: “The end of software secrecy is almost upon 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> <11b8h83$3b48o$1@dont-email.me> <oFSBS.93666$Q3f.6740@fx05.iad> <11b94e3$3hdo3$1@dont-email.me> User-Agent: slrn/1.0.3 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 28 Message-ID: <EdWBS.93422$TYg.8089@fx21.iad> X-Complaints-To: https://www.astraweb.com/aup NNTP-Posting-Date: Wed, 21 Oct 2026 03:22:12 UTC Date: Wed, 21 Oct 2026 03:22:12 GMT X-Received-Bytes: 2498 X-Original-Bytes: 2359