🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1312

Re: C: a question about scope automatics in C

#1312
From: Ross Finlayson
Date: Tue, 03 Nov 2026 17:02
100 lines
5555 bytes
On 11/03/2026 08:28 AM, bartc wrote:
> On 03/11/2026 16:16, Ross Finlayson wrote:
>
>> Hm. "Computronomat: natural language understanding, computational
>> linguistic comprehension", is a video essay or lecture recorded the
>> other day, I suppose that sounds like non-sense, also.
>>
>>
>> I'm not trying to cause trouble - just pointing out an opportunity
>> to make for a convention (code-convention and calling-convention and
>> compiler-convention and idiom and thei discipline), so that these
>> sorts "automatic temporary arrays", when they fit, can be accessed
>> as restrict'ed pointers allocated (according to the implementation,
>> according to the specification, so pretty much according to alloca()
>> on the implementation, standard language specification guardians),
>> a "perceived requirement" as with regards to "perceived deficiencies",
>> about high-performance high-reliability systems code.
>>
>> Does that make sense so far, yet?
>
> No. You sound just like a badly programmed bot.
>
>
>

Euh, ....

So, it doesn't compute? It dasn't?


So, say you got a long routine and it's a usual account of mapping from
one data-structure to another and converting or formatting, or, it's an
account of serialization or deserialization the mapping (usually enough
it's called), that it's required buffers, which may have fixed-bounds,
because for example you know that the entire language is words under
a fixed-bound, and any conversions/formatting also never go beyond the
bound, like a database-schema enforces it upstream and the
character-set-encoding is unambiguous or well-defined, and the
formatting fits
within the bounds.


Then, if one of these records has some dozens, scores, or hundreds of
fields, among textual, numeric, and calendric built-in and user-defined
types, then each one of these might need a buffer or buffers the
scratch-pad or working-memory, as the working-memory of the conversion &
formatting routines, since for example strtok and strtok_r and other
accounts of the conversion & formatting after the accessor/mutator
routines of the records their fields in accounts of structured
programming: are always using temporaries, here "automatic temporary
arrays", their buffers.


Now, say it only needs one of those buffers, yet, there are the umpteen
identifiers each with their declaration about it.

So, why lose?

Now, it's simple to just declare a buffer array at the beginning of
the routine, and re-use it, then for example that the compiler will
observe the dependency of the list of field-mappings, and be calling
the conversion & formatting routines, that then the compiler is quite
free to make of those what it will, the storage, of the memories,
in-memory, and that's great.


Then, these accessors & mutators, or "scanners & printers", the
conversion & formatting, variously are re-entrant or not, variously
need buffers or not, variously are re-orderable by the compiler or
not, and variously are thusly needing memory-management as
buffer-management up-front, about the code & data segments, the
stack-segment,
and the heap.

So, with many or deeply these conversion & formatting routines,
there's that somewhere between the static (and extern), and
the thread-local, and the code & data, and the stack, and the heap,
how to have that so the stack doesn't overflow, the code & data isn't
overlarge, and the heap isn't over-churned.

Then, when it all comes crashing down, for whatever reason,
it also has to result that everything will be OK.





"Okay" is sometimes said to be the word in widest usage throughout
the world, and of ancient origins, where "hurricane" is the oldest
word in the world, since before the pre-historic Bronze Age,
and on both sides of the Atlantic/Pacific.


Here though it just means "about perfect".



Thanks for writing, I don't keep grudges.

Technical Details
Message-ID: <x8adnYBW_KQgjnf3nZ2dnZfqn_adnZ2d@giganews.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.nrbbs.org!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-4.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
References: <oOScndMmgZhYRXX3nZ2dnZfqnPGdnZ2d@giganews.com> <11cce4h$3m11i$1@dont-email.me> <8V2dnW6M3YIeZ3T3nZ2dnZfqn_SdnZ2d@giganews.com> <11cd0tn$3tbkg$1@dont-email.me> <mdicnZHlMZlPlXf3nZ2dnZfqnPednZ2d@giganews.com> <11cd22m$3tpfp$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!news.nrbbs.org!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-4.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 03 Nov 2026 17:02:52 +0000
Subject: Re: C: a question about scope automatics in C
Newsgroups: comp.lang.c
References: <oOScndMmgZhYRXX3nZ2dnZfqnPGdnZ2d@giganews.com>
 <11cce4h$3m11i$1@dont-email.me>
 <8V2dnW6M3YIeZ3T3nZ2dnZfqn_SdnZ2d@giganews.com>
 <11cd0tn$3tbkg$1@dont-email.me>
 <mdicnZHlMZlPlXf3nZ2dnZfqnPednZ2d@giganews.com>
 <11cd22m$3tpfp$2@dont-email.me>
From: Ross Finlayson <ross.a.finlayson@gmail.com>
Date: Tue, 3 Nov 2026 09:02:32 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <11cd22m$3tpfp$2@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <x8adnYBW_KQgjnf3nZ2dnZfqn_adnZ2d@giganews.com>
Lines: 100
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-6cnurXBWXSmxsHUoVKXTB1C+cc2zCL/N/+JsY7Vk9YNuPBUPScmDlYIos6lx0bFVHhmP+GJz6O9jtAL!3IJPmjHOso2RBAXN1TKzBAkvZ5VmZggk9h2nqygI24Kld+CYbY7orzfmYkYFUL4MCkkfEZ2P0BQ=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40