Article View: comp.lang.c++
Article #279Re: “The end of software secrecy is almost upon
From: Chris M. Thomasson
Date: Fri, 23 Oct 2026 20:56
Date: Fri, 23 Oct 2026 20:56
57 lines
4028 bytes
4028 bytes
On 10/23/2026 12:19 PM, Lawrence D’Oliveiro wrote:
> On Fri, 23 Oct 2026 09:02:50 -0700, Peter Flass wrote:
>
>> On 10/22/26 22:29, Chris M. Thomasson wrote:
>>>
>>> On 10/22/2026 8:19 PM, Lawrence D’Oliveiro wrote:
>>>>
>>>> On Thu, 22 Oct 2026 07:26:21 -0700, Peter Flass wrote:
>>>>
>>>>> That's why I try to use PL/I AUTOMATIC (stack) storage and not
>>>>> allocate a lot of stuff. You need to have a disciplined approach
>>>>> if you allocate random stuff here and there.
>>>>
>>>> What if you’re building an object that needs to be returned to the
>>>> caller?
>>>
>>> Have the caller have the object before hand and call a function to
>>> initialize it?
>>
>> That obviously wouldn't work, since then the caller would have to
>> know something about the object beforehand.
>
> And what if the object didn’t consist of just *one*
> dynamically-allocated block, but needed links to other blocks as well?
> What if it needed objects dynamically allocated by other APIs, the
> details of which are internal to those APIs? Is the caller required to
> know about all these implementation details?
>
> In short, the concept doesn’t scale, because it completely breaks the
> concept of data abstraction.
>
> And it just pushes the dynamic-allocation problem elsewhere, without
> making it easier.
It can be made to work, and if it fits in with your "scheme", okay, if
not so what? Have an API that can give us the size of the object the
caller needs to create. So, again pseudo code:
size = foolib_create_get_size(...);
foo_alloc_req fareq = { };
foolib_create_get_alloc_req(&fareq);
foo = create_on_the_stack_etc(size, &fareq);
// The API would have all of that as prerequisites so the caller knows
// about it. Alignment requirements, etc.
foolib_init(foo);
...
foolib_destroy(foo);
The caller can gain the size, and the alignment requirements up front.
It can allocate it using any of its means. Then use that to call into
the lib. It works.
Technical Details
Message-ID:
<11bghmk$25qd0$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-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> <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> <11bg0fa$1unku$1@dont-email.me> <11bgc00$23hkg$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!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.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: Fri, 23 Oct 2026 13:56:49 -0700 Organization: A noiseless patient Spider Lines: 57 Message-ID: <11bghmk$25qd0$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> <11bg0fa$1unku$1@dont-email.me> <11bgc00$23hkg$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 23 Oct 2026 20:56:52 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2288032"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6ykA/chGjnu/AU3X+msdfMqgr7Vh5zzg="; posting-host="3dd5314fd073053f92065654fb7303e4" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:0Q/+l9wutQFpszLoW5IooIOj14g= sha256:kfBebRvQ6EMkQWVmKNYXjW7X+PIx+akbIX21VMuxorA= sha1:hWRDXwSf3Tk3HAyUdW1F49M+g/k= sha256:V3p/0JTCm7hJF8MKH9W2IxYNXJ2bGiY0Rd3gWeZ+RIs= Content-Language: en-US In-Reply-To: <11bgc00$23hkg$1@dont-email.me>