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 16:12:52 -0700 Organization: A noiseless patient Spider Lines: 23 Message-ID: <86a5uawykr.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> <873505pdw0.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="1084eb5dd0b1a11121af7ba127734067"; logging-data="2001730"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18879kRerkZsTarXxZ1wASj+MtZOLPZOXw=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:YSmQm3ctGKEm/b5NafVBxaEk/UI= sha1:1rsGTrUZx6oyImplqAkTfXn9eck= Xref: csiph.com comp.lang.c:173118 kalevi@kolttonen.fi (Kalevi Kolttonen) writes: > Malcolm McLean wrote: > >> No. Denis Ritchie didn't like const. But to say "const is a bad >> idea because Denis Ritchie didn't support it" is fallacious, though >> obvioulsy Denis Ritchie almost certainly knows what he is talking >> about, and obvioulsy the committee has shown their inferiority inm >> many other ways. But you have to look at the arguments Ritchie >> used, not just say "Ritchie says so, so it is". > > I am sorry, I am a bit lazy today and cannot be bothered to do web > searches. What exactly are Ritchie's arguments against "const"? > > I cannot think of any, but I have heard some that lend support > to having, and properly using, "const". Current thinking in programming language design tends to favor read-only being the default, with assignable variables needing an explicit indicator. I modestly suggest the keyword "prost" as a type qualifier to mean modifiable.