Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: C vs Haskell for XML parsing Date: Mon, 28 Aug 2023 06:58:54 -0700 Organization: A noiseless patient Spider Lines: 29 Message-ID: <86edjnxo81.fsf@linuxsc.com> References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com> <8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com> <639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com> <878r9zeynn.fsf@nosuchdomain.example.com> <20230826123929.770@kylheku.com> <20230826210521.20@kylheku.com> <20230827151627.814@kylheku.com> <87edjocbqj.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="61b7a310fb4086afc4b0d02730d52894"; logging-data="1823570"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18m13qKOhiRBgEIc79NSuah2zLz6cazdrU=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:ge3GRoYW8hwK0RepMmahzNL0JG0= sha1:KUFkhtDudP20TbG9YlthOTKKbH8= Xref: csiph.com comp.lang.c:172999 Keith Thompson writes: > Kaz Kylheku <864-117-4973@kylheku.com> writes: [named function arguments] >> The only way this can be sanely introduced into C with backward >> compatibility is if there is a separate way to introduce the >> parameter names used for named calling, like this: >> >> char *strcpy(const char * : dest, char * : src); > > Why not just declare > char *strcpy(const char *dest, char *src); > and use those names in calls, with a few simple rules for when there's > more than one visible declaration? Amusing that both of thesse declarations get the qualifiers wrong. I favor a different approach to this problem: static inline char * copy_to_from( char *to, const char *from ){ return strcpy( to, from ); } with no language changes needed. And people are still free to use the more concise form if they so desire.