Sujet : Re: Word For Today: “Uglification”
De : 433-929-6894 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 13. Mar 2024, 01:23:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240312171612.767@kylheku.com>
References : 1 2 3 4 5 6
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-03-12, Lawrence D'Oliveiro <
ldo@nz.invalid> wrote:
On Tue, 12 Mar 2024 08:03:50 +0000, Richard Kettlewell wrote:
>
That’s true, but AFAICT it’s exactly what Lawrence is complaining about:
there’s nothing in the language spec to help those thousand other
libraries avoid name clashes.
>
My specific complaint was about temporary names being used internal to
library macros. It’s a problem that is essentially impossible to solve
with string-based macro processors.
Firstly, C preprocessing is not exactly "string based" but token based.
A string or token based macro preprocessor could provide a way for
macros to obtain and use generated symbols (gensyms): identifiers
that are valid in the host language for variables and other uses,
but are uniquely generated within the translation unit.
Needless to say, the standard C preprocessing doesn't provide such a
thing, which is a problem.
But this issue independent of weaknesses caused by macro processing
being token or character based. A structural macro preprocessor that
doesn't provide gensyms or any equivalent form of hygiene would have the
same problem.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca