Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.std.c Subject: Re: conditional macro definition also for recursive conditionally limited expansion Date: Wed, 19 Jan 2022 06:53:55 -0800 Organization: A noiseless patient Spider Lines: 34 Message-ID: <86o847rd30.fsf@linuxsc.com> References: <723aa6f8-0994-4b1d-b2d2-59abe33906ban@googlegroups.com> <86v8yis6mt.fsf@linuxsc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="6fad361a12fcf775509d251c0ab1bed8"; logging-data="7996"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uxFAxTewOwNqGkTBOf1bMGzMoJTAaYcQ=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:G7BolJTvO1SkQ6DnXUNXXgGjxL4= sha1:YXZ3cBp7uPoKzjNm3KXB8V/f/y8= Xref: csiph.com comp.std.c:6428 Marco Munari writes: > On Monday, January 17, 2022 at 4:51:12 PM UTC+1, Tim Rentsch wrote: > >> Marco Munari writes: >> >>> [conditional / recursive macro expansion] >> >> It's an interesting idea. There are details that need to be >> explored and understood first. Also I think it would be better >> if expanded and generalized, perhaps along the lines of 'cond' >> in lisp, or alternatively with ?# :# as preprocessing if/else. >> Hmmm... > > I'm favorable to any changes to the syntax I proposed, I don't mean to suggest any specific changes, just throwing out ideas. > You mentioned lisp, yes and why not lisp... I mean even lisp > syntax! [...] I think it would be hard to integrate lisp syntax into C's lexical environment. Technically it might be feasible, but there are also human factors to consider, and those look rather daunting. > Interesting also your concise syntax ?# :# (or maybe you > meant ... #? ... #: ... [...] It was just a casual suggestion. Obviously there are lots of details to consider before settling on specifics. Good luck!