Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"It's a dog-eat-dog world out there, and I'm wearing Milkbone underware." -- Norm, from _Cheers_


devel / comp.lang.c / Re: C vs Haskell for XML parsing

SubjectAuthor
* C vs Haskell for XML parsingMalcolm McLean
+* Re: C vs Haskell for XML parsingBart
|+* Re: C vs Haskell for XML parsingBen Bacarisse
||`* Re: C vs Haskell for XML parsingMalcolm McLean
|| `* Re: C vs Haskell for XML parsingBen Bacarisse
||  `* Re: C vs Haskell for XML parsingMalcolm McLean
||   `* Re: C vs Haskell for XML parsingBen Bacarisse
||    +* Re: C vs Haskell for XML parsingMalcolm McLean
||    |`- Re: C vs Haskell for XML parsingBen Bacarisse
||    `* Re: C vs Haskell for XML parsingMalcolm McLean
||     +- Re: C vs Haskell for XML parsingLew Pitcher
||     +* Re: C vs Haskell for XML parsingScott Lurndal
||     |+* Re: C vs Haskell for XML parsingLew Pitcher
||     ||+- Re: C vs Haskell for XML parsingLew Pitcher
||     ||`- Re: C vs Haskell for XML parsingScott Lurndal
||     |`* Re: C vs Haskell for XML parsingBen Bacarisse
||     | `- Re: C vs Haskell for XML parsingScott Lurndal
||     `* Re: C vs Haskell for XML parsingBen Bacarisse
||      `* Re: C vs Haskell for XML parsingMalcolm McLean
||       +- Re: C vs Haskell for XML parsingRichard Damon
||       `* Re: C vs Haskell for XML parsingBen Bacarisse
||        `* Re: C vs Haskell for XML parsingMalcolm McLean
||         +- Re: C vs Haskell for XML parsingKeith Thompson
||         `* Re: C vs Haskell for XML parsingBen Bacarisse
||          +* Re: C vs Haskell for XML parsingMalcolm McLean
||          |`- Re: C vs Haskell for XML parsingBen Bacarisse
||          `* Re: C vs Haskell for XML parsingDavid Brown
||           +* Re: C vs Haskell for XML parsingMalcolm McLean
||           |`* Re: C vs Haskell for XML parsingDavid Brown
||           | `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |  `* Re: C vs Haskell for XML parsingDavid Brown
||           |   +* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   |+* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||`* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   || `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||  `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||   `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||    `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     +* Re: C vs Haskell for XML parsingBart
||           |   ||     |`* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     | `- Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     +* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |`* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     | +- Re: C vs Haskell for XML parsingScott Lurndal
||           |   ||     | `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |  `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |   `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |    `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |     +* Re: C vs Haskell for XML parsingBart
||           |   ||     |     |+* Re: C vs Haskell for XML parsingKaz Kylheku
||           |   ||     |     ||`- Re: C vs Haskell for XML parsingKaz Kylheku
||           |   ||     |     |`- Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |     `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      +* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      |+* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      ||+* Re: C vs Haskell for XML parsingScott Lurndal
||           |   ||     |      |||`* Re: C vs Haskell for XML parsingLew Pitcher
||           |   ||     |      ||| `* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      |||  `- Re: C vs Haskell for XML parsingLew Pitcher
||           |   ||     |      ||+* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      |||`* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      ||| `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      |||  `- Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      ||`* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || +* Re: C vs Haskell for XML parsingScott Lurndal
||           |   ||     |      || |`* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || | +- Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || | `* Re: C vs Haskell for XML parsingJames Kuyper
||           |   ||     |      || |  +* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  |+* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || |  ||`* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  || `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || |  ||  `* Re: C vs Haskell for XML parsingKaz Kylheku
||           |   ||     |      || |  ||   +- Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  ||   `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || |  ||    `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  ||     `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      || |  ||      `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  ||       `- Re: C vs Haskell for XML parsingTim Rentsch
||           |   ||     |      || |  |+* Re: C vs Haskell for XML parsingKaz Kylheku
||           |   ||     |      || |  ||`- Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      || |  |+- Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      || |  |`- Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      || |  `- Re: C vs Haskell for XML parsingScott Lurndal
||           |   ||     |      || `* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      ||  `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      ||   +- Re: C vs Haskell for XML parsingChris M. Thomasson
||           |   ||     |      ||   `- Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      |`* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      | +* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | |+* Re: C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||+* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | |||+- Re: C vs Haskell for XML parsingBen Bacarisse
||           |   ||     |      | |||+* Re: C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||||`* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | |||| `* Re: C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||||  `* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | ||||   `* Re: C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||||    `* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | ||||     `* Re: C vs Haskell for XML parsingRichard Damon
||           |   ||     |      | ||||      `* Re: C vs Haskell for XML parsingKeith Thompson
||           |   ||     |      | |||`- Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      | ||`* Re: C vs Haskell for XML parsingBart
||           |   ||     |      | |`* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      | `* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      +- Re: C vs Haskell for XML parsingSpiros Bousbouras
||           |   ||     |      +* Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     |      +* Underscores in type names (was : C vs Haskell for XML parsing)Spiros Bousbouras
||           |   ||     |      +* Re: C vs Haskell for XML parsingDavid Brown
||           |   ||     |      `- Re: C vs Haskell for XML parsingMalcolm McLean
||           |   ||     `- Re: C vs Haskell for XML parsingKeith Thompson
||           |   |`- Re: C vs Haskell for XML parsingScott Lurndal
||           |   `- Re: C vs Haskell for XML parsingBart
||           `- Re: C vs Haskell for XML parsingBen Bacarisse
|+* Re: C vs Haskell for XML parsingfir
|`* Re: C vs Haskell for XML parsingKaz Kylheku
+- Re: C vs Haskell for XML parsingBen Bacarisse
+- Re: C vs Haskell for XML parsingfir
`* Re: C vs Haskell for XML parsingfir

Pages:123456789101112
Re: C vs Haskell for XML parsing

<875y51e8vj.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28224&group=comp.lang.c#28224

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sat, 26 Aug 2023 15:28:32 -0700
Organization: None to speak of
Lines: 40
Message-ID: <875y51e8vj.fsf@nosuchdomain.example.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="f59bf797c486742749b57ed64aff336a";
logging-data="839146"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19iVePUjxfpjQPhsROXI8TF"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:wXe/KB9N6Kfw7WP7a6N13tBPVHU=
sha1:bjp2H1lnN4ko1k0VAshxUsZ136M=
 by: Keith Thompson - Sat, 26 Aug 2023 22:28 UTC

Bart <bc@freeuk.com> writes:
[...]
> I assume the reason for the underscope (I don't know why there are two
> and not one), is so that 'str' is not shadowed by a global macro name
> 'str' if that happens to be defined before 'puts'.
>
> If 'str' expands to something that isn't an identifier, it can cause a
> syntax error.
>
> OK, use a prefix then, if the alternative is not to have the feature at all.

Those aren't the only alternatives.

> Note that somebody can still define a macro called 'puts'. Note also
> that gcc headers (that is, the headers that are associated with my gcc
> installation, in case somebody wants to bring that up again),

No, I don't want to bring that up again. Why do you?

> use
> "_Str" for the parameter name, with one underscore and a capital
> letter.
>
> It's not clear what the purpose of these names is, unless they had
> keyword parameters already in mind.

The purpose is conformance. A strictly conforming program can define
"str" as a macro before including <stdio.h>.

A program that defines "puts" as a macro before including <stdio.h> had
undefined behavior; see N1570 7.1.3p1, last bullet point. File scope
identifiers, including function names declared in standard headers, are
reserved for use a macro names. Parameter names are not.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: C vs Haskell for XML parsing

<873505pdw0.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28226&group=comp.lang.c#28226

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 00:44:47 +0100
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <873505pdw0.fsf@bsb.me.uk>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<ubvo4d$1tm0p$1@dont-email.me>
<e9853969-42ce-48db-81e1-d37c8e4da59dn@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me>
<b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me>
<efcf98fa-f078-490c-99fa-5c281cadcebbn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="9841c7ec24480b499dbe8afdd078d3f4";
logging-data="876002"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pvy6BfnS/DgSG2GZvNJxk0AS8MqWY3Zw="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:M3jsmcy1x7FFJ4h81KfO9Opotek=
sha1:q76rV9E3DkrarzG5/D2A7DJJZxs=
X-BSB-Auth: 1.80f3a2687b606502568e.20230827004447BST.873505pdw0.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 26 Aug 2023 23:44 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> On Friday, 25 August 2023 at 12:39:13 UTC+1, David Brown wrote:

>> Not that either of these appeals to authority have any relevance.
>>
> You don't really understand the "authority" fallacy.
> Denis Ritchie's opinion that const was a bad idea doesn't make it true that
> const was a bad idea. His opinion that Coke is nicer than Pepsi would
> however make it true that Coke is nicer than Pepsi, for him.

So you cited DMR, the designer of the C language, simply as an example
of one person with a preference to avoid underscores in C identifiers?
It could have been Kevin from accounts or Barbara finance as neither
uses underscores in their C programs? In no way did you want to imply
that Ritchie's opinion as a highly respected programmer and the designer
of the language in question might carry greater weight (i.e. authority)
on this topic? Kevin, Barbara and DMR are all equally authoritative on
the matter of their own preferences. I find that hard to believe, but
if you /didn't/ intend an appeal to his (often presumed) authority, then
it was a very poor choice.

As it happens, I am not with David on this. There are many matters on
which I think an appeal to authority carries significant weight. I
don't know DMR's opinion of underscores (the code in K&R is indicative
but not exactly conclusive), but I would take more time considering it
than I would Kevin's or Barbara's. It's just one way to simplify life.

But maybe you cited DMR simply because could not find any other
examples. I looked at your BBXRC code (I know it's not all yours) and I
found lots of identifiers with underscores:

only_saw_ascii_range
le_control_chars
be_control_chars
null_suggests_binary_
unexpected_null_threshold
even_null_threshold
TEXTENC_UTF8_BOM
TEXTENC_ANSI
utf16_unexpected_null_percent_
lodepng_decode32_file
error_exit
out_of_memory
opt_get

and so on. Are they your choices or someone else's?

--
Ben.

Re: C vs Haskell for XML parsing

<cawGM.170690$8_8a.28739@fx48.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28227&group=comp.lang.c#28227

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: C vs Haskell for XML parsing
Content-Language: en-US
Newsgroups: comp.lang.c
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <874jkmfyqp.fsf@nosuchdomain.example.com>
<yhdGM.457100$xMqa.361350@fx12.iad> <87r0nqecgu.fsf@nosuchdomain.example.com>
<f0eGM.457102$xMqa.276001@fx12.iad> <87il92e8tr.fsf@nosuchdomain.example.com>
<eLnGM.170688$8_8a.16135@fx48.iad> <87a5ude9kw.fsf@nosuchdomain.example.com>
From: Rich...@Damon-Family.org (Richard Damon)
In-Reply-To: <87a5ude9kw.fsf@nosuchdomain.example.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 62
Message-ID: <cawGM.170690$8_8a.28739@fx48.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 26 Aug 2023 19:47:20 -0400
X-Received-Bytes: 4450
 by: Richard Damon - Sat, 26 Aug 2023 23:47 UTC

On 8/26/23 6:13 PM, Keith Thompson wrote:
> Richard Damon <Richard@Damon-Family.org> writes:
>> On 8/26/23 12:17 AM, Keith Thompson wrote:
> [...]
>>> Hmm. The standard could say that if you define a parameter name as
>>> an object-like macro before including a header that declares a
>>> function with that parameter, the behavior is undefined. In other
>>> words, standard parameter names would be reserved, but in fewer
>>> contexts than standard function names. Since parameter names are
>>> lowercase, there shouldn't be a lot of code using them as macros.
>>
>> Yes, they could, and break the backwards compatibility rule that has
>> been a fundamental rule for the history of the standard.
>
> No major edition of the standard has strictly followed that rule.
>
> `main() { printf("hello world); }` -- broken by C99
> `int restrict;` -- broken by C11
> `typedef int bool;` -- broken by C23
>
> And so on.

And each of those created debate, and was carefully considered.

The removal of implicit int in C99 was a deliberate decision, based on
the agreement that the "feature" was actually a bad idea, and it is easy
to fix the code, as you just need to add the int at the point where you
get the syntax error.

C11 reserving restrict was a single identifier, so limited impact on
programs. And again, should be simple to fix, as you will get a syntex
error. As I remember, there was a strong push from people working on
optimization, as it can have significant impact in some situations.

For bool, bool was added as a conditionally restricted name in C99, so
24 years later, code (that will be updated to C23) has almost certainly
removed other usage of the symbol.

It is a rule "proven" by the limited exceptions to it. The rule is to
take careful consideration of the breakage, not a total prohibition.

>
>> Yes, the common coding practice of UPPER CASE for macros limits the
>> damage, that common coding practice is NOT a "rule", so can't be
>> relied on.
>>
>> The problem is that there are people who don't follow that rule, and
>> their code could get broken.
>
> With carefully chosen parameter names, I'm skeptical that there's *any*
> existing code that would be broken.
>

I am not so sure. Yes, it will be rare, but not zero. More
problematically not sure you will always get a error if the header use
"user" names for parameters to be "pretty", and not implementation names
to be safe.

I suppose one option to make thing prettier would be to say that if the
prototype used a __ type name, that in the call, you are also allowed to
use a name without those two underscores (as long as that doesn't match
another parameter name).

Re: C vs Haskell for XML parsing

<87wmxhnyub.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28228&group=comp.lang.c#28228

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 00:55:08 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <87wmxhnyub.fsf@bsb.me.uk>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me>
<b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<j=2ifExxFfXU05g0F@bongo-ra.co>
<ae3d2d4e-71bd-4c6c-99aa-cf8b6b652175n@googlegroups.com>
<87pm3bot1n.fsf@bsb.me.uk>
<7a9b3883-ee9f-4d46-944c-c11d4f0354d5n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="9841c7ec24480b499dbe8afdd078d3f4";
logging-data="876002"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PNz/lulkkNiGQP+X1qlDwIfGSI5PYqIY="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:PYg2eWTua6ya4hCE5dol0FuaHKs=
sha1:eYlcAYnFFgWih5KUyo/IXEufUXE=
X-BSB-Auth: 1.af28fbc04a44376aafb1.20230827005508BST.87wmxhnyub.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 26 Aug 2023 23:55 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> On Friday, 25 August 2023 at 19:50:42 UTC+1, Ben Bacarisse wrote:
>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>
>> > On Friday, 25 August 2023 at 09:50:32 UTC+1, Spiros Bousbouras wrote:
>> >> On Fri, 25 Aug 2023 01:37:38 -0700 (PDT)
>> >> Malcolm McLean <malcolm.ar...@gmail.com> wrote:
>> >> > Of course size_t has an underscore. Everyone knows that. And most people
>> >> > agree that it is horrible.
>> >> "Most people" meaning you made it up.
>> >>
>> > We could do a straw poll.
>> > How many people like the underscore in size_t and how many think it is
>> > horrible?
>> Did you really just set up a false dichotomy to try to tip the results?
>> The question should be simply whether you agree that it's horrible or
>> not. You don't have to actually like it to not agree that it's
>> horrible.
>>
> That's a mathematician thinking.

Thank you. But I don't really qualify anymore (I indeed I ever did).

And, in fact, I was actually thinking rhetorically -- how would I word
it to tip the result? I was considering: "is size_t a sound engineering
compromise or a dog's breakfast?".

> "Not horrible" is the complentary set to
> "horrible" and thus should be the other choice.
> It doesn't work like that.
> Bascially "horrible" is a word, whilst "not horrible" is not.

I refer you to David's excellent reply.

--
Ben.

Re: C vs Haskell for XML parsing

<871qfpdyn6.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28231&group=comp.lang.c#28231

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sat, 26 Aug 2023 19:09:33 -0700
Organization: None to speak of
Lines: 57
Message-ID: <871qfpdyn6.fsf@nosuchdomain.example.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad>
<874jkmfyqp.fsf@nosuchdomain.example.com>
<yhdGM.457100$xMqa.361350@fx12.iad>
<87r0nqecgu.fsf@nosuchdomain.example.com>
<f0eGM.457102$xMqa.276001@fx12.iad>
<87il92e8tr.fsf@nosuchdomain.example.com>
<eLnGM.170688$8_8a.16135@fx48.iad>
<87a5ude9kw.fsf@nosuchdomain.example.com>
<cawGM.170690$8_8a.28739@fx48.iad>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="f59bf797c486742749b57ed64aff336a";
logging-data="1058343"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LjU6EItwtznjBMqYpEprm"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:K55NIVxQfCbfTswQi3fXf+1KzB0=
sha1:yg08eWuZPcW4cgCJ9a6e56aOiB0=
 by: Keith Thompson - Sun, 27 Aug 2023 02:09 UTC

Richard Damon <Richard@Damon-Family.org> writes:
> On 8/26/23 6:13 PM, Keith Thompson wrote:
>> Richard Damon <Richard@Damon-Family.org> writes:
>>> On 8/26/23 12:17 AM, Keith Thompson wrote:
>> [...]
>>>> Hmm. The standard could say that if you define a parameter name as
>>>> an object-like macro before including a header that declares a
>>>> function with that parameter, the behavior is undefined. In other
>>>> words, standard parameter names would be reserved, but in fewer
>>>> contexts than standard function names. Since parameter names are
>>>> lowercase, there shouldn't be a lot of code using them as macros.
>>>
>>> Yes, they could, and break the backwards compatibility rule that has
>>> been a fundamental rule for the history of the standard.
>> No major edition of the standard has strictly followed that rule.
>> `main() { printf("hello world); }` -- broken by C99
>> `int restrict;` -- broken by C11
>> `typedef int bool;` -- broken by C23
>> And so on.
>
> And each of those created debate, and was carefully considered.

As this should be.

[...]

>> With carefully chosen parameter names, I'm skeptical that there's
>> *any* existing code that would be broken.
>
> I am not so sure. Yes, it will be rare, but not zero. More
> problematically not sure you will always get a error if the header use
> "user" names for parameters to be "pretty", and not implementation
> names to be safe.

You'd get an error for a source file that defines a (lower case)
parameter name as a macro *before including the header*. How common is
that? (I'm guessing the most common case for that would be a
"-Dfoo=bar" command-line option.)

Suppose fopen's first parameter is named "filename". If I #define
filename after "#include <stdio.h>", that's fine. It only means that I
can't use a named argument when calling fopen -- but I've already
decided I want to use the identifier "filename" for my own purposes.

If there's real-world code that would break, either because it defines a
lowercase macro before including a standard header or because of
something I've missed, I'd be interested in seeing it.

> I suppose one option to make thing prettier would be to say that if
> the prototype used a __ type name, that in the call, you are also
> allowed to use a name without those two underscores (as long as that
> doesn't match another parameter name).

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: C vs Haskell for XML parsing

<1wyGM.118100$O8ab.63790@fx40.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28232&group=comp.lang.c#28232

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx40.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: C vs Haskell for XML parsing
Content-Language: en-US
Newsgroups: comp.lang.c
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <874jkmfyqp.fsf@nosuchdomain.example.com>
<yhdGM.457100$xMqa.361350@fx12.iad> <87r0nqecgu.fsf@nosuchdomain.example.com>
<f0eGM.457102$xMqa.276001@fx12.iad> <87il92e8tr.fsf@nosuchdomain.example.com>
<eLnGM.170688$8_8a.16135@fx48.iad> <87a5ude9kw.fsf@nosuchdomain.example.com>
<cawGM.170690$8_8a.28739@fx48.iad> <871qfpdyn6.fsf@nosuchdomain.example.com>
From: Rich...@Damon-Family.org (Richard Damon)
In-Reply-To: <871qfpdyn6.fsf@nosuchdomain.example.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 65
Message-ID: <1wyGM.118100$O8ab.63790@fx40.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 26 Aug 2023 22:27:09 -0400
X-Received-Bytes: 4534
 by: Richard Damon - Sun, 27 Aug 2023 02:27 UTC

On 8/26/23 10:09 PM, Keith Thompson wrote:
> Richard Damon <Richard@Damon-Family.org> writes:
>> On 8/26/23 6:13 PM, Keith Thompson wrote:
>>> Richard Damon <Richard@Damon-Family.org> writes:
>>>> On 8/26/23 12:17 AM, Keith Thompson wrote:
>>> [...]
>>>>> Hmm. The standard could say that if you define a parameter name as
>>>>> an object-like macro before including a header that declares a
>>>>> function with that parameter, the behavior is undefined. In other
>>>>> words, standard parameter names would be reserved, but in fewer
>>>>> contexts than standard function names. Since parameter names are
>>>>> lowercase, there shouldn't be a lot of code using them as macros.
>>>>
>>>> Yes, they could, and break the backwards compatibility rule that has
>>>> been a fundamental rule for the history of the standard.
>>> No major edition of the standard has strictly followed that rule.
>>> `main() { printf("hello world); }` -- broken by C99
>>> `int restrict;` -- broken by C11
>>> `typedef int bool;` -- broken by C23
>>> And so on.
>>
>> And each of those created debate, and was carefully considered.
>
> As this should be.
>
> [...]
>
>>> With carefully chosen parameter names, I'm skeptical that there's
>>> *any* existing code that would be broken.
>>
>> I am not so sure. Yes, it will be rare, but not zero. More
>> problematically not sure you will always get a error if the header use
>> "user" names for parameters to be "pretty", and not implementation
>> names to be safe.
>
> You'd get an error for a source file that defines a (lower case)
> parameter name as a macro *before including the header*. How common is
> that? (I'm guessing the most common case for that would be a
> "-Dfoo=bar" command-line option.)

Yes, that is the most like case, a -D option, perhaps from an IDE
configuration.

>
> Suppose fopen's first parameter is named "filename". If I #define
> filename after "#include <stdio.h>", that's fine. It only means that I
> can't use a named argument when calling fopen -- but I've already
> decided I want to use the identifier "filename" for my own purposes.
>
> If there's real-world code that would break, either because it defines a
> lowercase macro before including a standard header or because of
> something I've missed, I'd be interested in seeing it.

I've seen code with lower case name macros as a result of converting run
time configuration to fixed configuration, provide at build time.

filename is a likely parameter for something like this.

>
>> I suppose one option to make thing prettier would be to say that if
>> the prototype used a __ type name, that in the call, you are also
>> allowed to use a name without those two underscores (as long as that
>> doesn't match another parameter name).
>

Re: C vs Haskell for XML parsing

<20230826210521.20@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28236&group=comp.lang.c#28236

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 04:24:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <20230826210521.20@kylheku.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
Injection-Date: Sun, 27 Aug 2023 04:24:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a2032472e4c71daff29c54dd92dd40dc";
logging-data="1092081"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EseHog2h6ObLa0H02gw7RVY/RbtiIF4I="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:v3WSfwETNFlJuoyoGmQp4L7DZCY=
 by: Kaz Kylheku - Sun, 27 Aug 2023 04:24 UTC

On 2023-08-26, Bart <bc@freeuk.com> wrote:
> With the feature in place, people can create their own wrapper functions
> and make their own choices.

Yikes; just what we need: people scrambling the order of arguments
to standard functions, using their own local names.

Quick, which one is the destination?

strcpy(goat: userid, fish: uid);

:)

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: C vs Haskell for XML parsing

<ucel76$11gfl$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28238&group=comp.lang.c#28238

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sat, 26 Aug 2023 21:59:19 -0700
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <ucel76$11gfl$2@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
<20230826210521.20@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 04:59:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8e1daed50adb974a734bb3c89635a581";
logging-data="1098229"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19efIEjq/9wO21ZB4nBgAV6tsuW5mW2jZ0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:ysW8r0KJ4OjR+Xc/eiEBw2ZIgJM=
Content-Language: en-US
In-Reply-To: <20230826210521.20@kylheku.com>
 by: Chris M. Thomasson - Sun, 27 Aug 2023 04:59 UTC

On 8/26/2023 9:24 PM, Kaz Kylheku wrote:
> On 2023-08-26, Bart <bc@freeuk.com> wrote:
>> With the feature in place, people can create their own wrapper functions
>> and make their own choices.
>
> Yikes; just what we need: people scrambling the order of arguments
> to standard functions, using their own local names.
>
> Quick, which one is the destination?
>
> strcpy(goat: userid, fish: uid);
>
> :)
>

fish:shark eats goat userid 42?

Re: C vs Haskell for XML parsing

<03a4b2f0-92a7-4652-86f6-66f7d5cf8853n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28239&group=comp.lang.c#28239

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:7f07:0:b0:40f:f509:3a75 with SMTP id f7-20020ac87f07000000b0040ff5093a75mr567544qtk.7.1693115651002;
Sat, 26 Aug 2023 22:54:11 -0700 (PDT)
X-Received: by 2002:a05:6214:925:b0:63f:c0b9:e07a with SMTP id
dk5-20020a056214092500b0063fc0b9e07amr711536qvb.13.1693115650814; Sat, 26 Aug
2023 22:54:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Sat, 26 Aug 2023 22:54:10 -0700 (PDT)
In-Reply-To: <yJnGM.142651$ftCb.40495@fx34.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:a5f9:166e:840e:d1f9;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:a5f9:166e:840e:d1f9
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com> <uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com> <uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com> <uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com> <87h6onfje9.fsf@nosuchdomain.example.com>
<66653005-66fa-4a89-8b1f-0b415fb7e8ean@googlegroups.com> <yJnGM.142651$ftCb.40495@fx34.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <03a4b2f0-92a7-4652-86f6-66f7d5cf8853n@googlegroups.com>
Subject: Re: C vs Haskell for XML parsing
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Sun, 27 Aug 2023 05:54:10 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2716
 by: Malcolm McLean - Sun, 27 Aug 2023 05:54 UTC

On Saturday, 26 August 2023 at 15:10:54 UTC+1, Scott Lurndal wrote:
> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> >On Friday, 25 August 2023 at 12:31:44 UTC+1, Keith Thompson wrote:
> >> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> >> > On Friday, 25 August 2023 at 08:46:22 UTC+1, David Brown wrote:
> >> [...]
> >> >> The only thing /wrong/ - and pretty much everyone thinks it is wrong -
> >> >> would be to call it "multiplymatrixwithvector".
> >> >>
> >> > Well Caesar disagreed.
> >> Let's drop the lengthy discussions of ancient writing systems, shall we?
> >> (And David, please stop encouraging them.)
> >>
> >For about two thousand years, text was written without spaces. Any rational
> >person, to whom this was pointed out, would accept that that is prima facie
> >evidence that it is not that difficult to read.
> The sources I found indicate that it wasn't intended to be read by anyone
> other than the person who wrote it.
>
Just goes to show that you can believe everything you read.
Do you think that is remotely plausible?

Re: C vs Haskell for XML parsing

<bc75d61f-66a7-4132-9fd0-7c3eda49fe8bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28240&group=comp.lang.c#28240

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:3199:b0:64f:9386:a3a6 with SMTP id lb25-20020a056214319900b0064f9386a3a6mr133851qvb.7.1693116491222;
Sat, 26 Aug 2023 23:08:11 -0700 (PDT)
X-Received: by 2002:a17:902:c609:b0:1b9:d1bd:a656 with SMTP id
r9-20020a170902c60900b001b9d1bda656mr6573595plr.4.1693116490693; Sat, 26 Aug
2023 23:08:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Sat, 26 Aug 2023 23:08:10 -0700 (PDT)
In-Reply-To: <ucdcsr$mj8h$3@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:a5f9:166e:840e:d1f9;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:a5f9:166e:840e:d1f9
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<ubvo4d$1tm0p$1@dont-email.me> <e9853969-42ce-48db-81e1-d37c8e4da59dn@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me> <b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me> <d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me> <d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me> <1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me> <81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me> <8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me> <639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me> <d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<87h6onfje9.fsf@nosuchdomain.example.com> <66653005-66fa-4a89-8b1f-0b415fb7e8ean@googlegroups.com>
<ucdcsr$mj8h$3@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bc75d61f-66a7-4132-9fd0-7c3eda49fe8bn@googlegroups.com>
Subject: Re: C vs Haskell for XML parsing
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Sun, 27 Aug 2023 06:08:11 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4151
 by: Malcolm McLean - Sun, 27 Aug 2023 06:08 UTC

On Saturday, 26 August 2023 at 18:31:21 UTC+1, David Brown wrote:
> On 26/08/2023 11:52, Malcolm McLean wrote:
> > On Friday, 25 August 2023 at 12:31:44 UTC+1, Keith Thompson wrote:
> >> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> >>> On Friday, 25 August 2023 at 08:46:22 UTC+1, David Brown wrote:
> >> [...]
> >>>> The only thing /wrong/ - and pretty much everyone thinks it is wrong -
> >>>> would be to call it "multiplymatrixwithvector".
> >>>>
> >>> Well Caesar disagreed.
> >> Let's drop the lengthy discussions of ancient writing systems, shall we?
> >> (And David, please stop encouraging them.)
> >>
> > For about two thousand years, text was written without spaces. Any rational
> > person, to whom this was pointed out, would accept that that is prima facie
> > evidence that it is not that difficult to read. However David Brown has got to
> > try to make out that the reason the style was adopted was to make it harder
> > for slaves to read confidential documents. It's beyond absurd.
> I think I am beginning to understand. You can't read, or won't read, so
> it doesn't matter to you whether there are spaces or not.
>
> I enjoy talking about history, and I happen to know a bit about writing
> systems - modern and outdated. I had hoped, since you know a bit of
> Hebrew and have looked at old texts, that I might have learned something
> new. But I was wrong - you have some basic knowledge combined with some
> flat-earth ideas, and you haven't actually bothered reading what I
> wrote. So time to stop, I think.
>
I know. But it irritates Keith. And it's very tangential to C, so he has a case.

Text was written without spaces until the practice died out in the late medieval
period. It's not difficult to read, but silent reading was rare and most people
read aloud. Spaces make text easier for silent readers to read. Underscores -
the jury is out, but you can't simply assume that, because spaces make text
easier to read, underscores will also do so.

Re: C vs Haskell for XML parsing

<uceq43$127sr$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28241&group=comp.lang.c#28241

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sat, 26 Aug 2023 23:23:00 -0700
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <uceq43$127sr$1@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me>
<b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<87h6onfje9.fsf@nosuchdomain.example.com>
<66653005-66fa-4a89-8b1f-0b415fb7e8ean@googlegroups.com>
<ucdcsr$mj8h$3@dont-email.me>
<bc75d61f-66a7-4132-9fd0-7c3eda49fe8bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 06:22:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8e1daed50adb974a734bb3c89635a581";
logging-data="1122203"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+TjuAEPC0b4GcJhKWXjxKlgmWEbb4uZwI="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:1j4ByeNk2Mdr7hqtH3T8nr4k9cM=
In-Reply-To: <bc75d61f-66a7-4132-9fd0-7c3eda49fe8bn@googlegroups.com>
Content-Language: en-US
 by: Chris M. Thomasson - Sun, 27 Aug 2023 06:23 UTC

On 8/26/2023 11:08 PM, Malcolm McLean wrote:
> On Saturday, 26 August 2023 at 18:31:21 UTC+1, David Brown wrote:
>> On 26/08/2023 11:52, Malcolm McLean wrote:
>>> On Friday, 25 August 2023 at 12:31:44 UTC+1, Keith Thompson wrote:
>>>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>>>> On Friday, 25 August 2023 at 08:46:22 UTC+1, David Brown wrote:
>>>> [...]
>>>>>> The only thing /wrong/ - and pretty much everyone thinks it is wrong -
>>>>>> would be to call it "multiplymatrixwithvector".
>>>>>>
>>>>> Well Caesar disagreed.
>>>> Let's drop the lengthy discussions of ancient writing systems, shall we?
>>>> (And David, please stop encouraging them.)
>>>>
>>> For about two thousand years, text was written without spaces. Any rational
>>> person, to whom this was pointed out, would accept that that is prima facie
>>> evidence that it is not that difficult to read. However David Brown has got to
>>> try to make out that the reason the style was adopted was to make it harder
>>> for slaves to read confidential documents. It's beyond absurd.
>> I think I am beginning to understand. You can't read, or won't read, so
>> it doesn't matter to you whether there are spaces or not.
>>
>> I enjoy talking about history, and I happen to know a bit about writing
>> systems - modern and outdated. I had hoped, since you know a bit of
>> Hebrew and have looked at old texts, that I might have learned something
>> new. But I was wrong - you have some basic knowledge combined with some
>> flat-earth ideas, and you haven't actually bothered reading what I
>> wrote. So time to stop, I think.
>>
> I know. But it irritates Keith. And it's very tangential to C, so he has a case.
>
> Text was written without spaces until the practice died out in the late medieval
> period. It's not difficult to read, but silent reading was rare and most people
> read aloud. Spaces make text easier for silent readers to read. Underscores -
> the jury is out, but you can't simply assume that, because spaces make text
> easier to read, underscores will also do so.
>

ever_use_posix_api_s ?

;^)

Re: C vs Haskell for XML parsing

<17e4272c-47f8-427b-8fd6-21b1108b573dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28242&group=comp.lang.c#28242

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:5743:0:b0:40f:e0dd:8050 with SMTP id 3-20020ac85743000000b0040fe0dd8050mr694760qtx.5.1693117972612;
Sat, 26 Aug 2023 23:32:52 -0700 (PDT)
X-Received: by 2002:a05:622a:309:b0:410:8976:562b with SMTP id
q9-20020a05622a030900b004108976562bmr564696qtw.3.1693117972350; Sat, 26 Aug
2023 23:32:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Sat, 26 Aug 2023 23:32:52 -0700 (PDT)
In-Reply-To: <pQtGM.261905$uLJb.8744@fx41.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:a5f9:166e:840e:d1f9;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:a5f9:166e:840e:d1f9
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me> <1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me> <81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me> <8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me> <639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me> <d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<JhpGM.631626$SuUf.416528@fx14.iad> <ucd871$l3b5$1@dont-email.me>
<3RpGM.755540$AsA.124161@fx18.iad> <ucdcg8$mi31$1@dont-email.me>
<_JqGM.129929$QQFb.65959@fx38.iad> <ucdip0$nn0q$1@dont-email.me> <pQtGM.261905$uLJb.8744@fx41.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <17e4272c-47f8-427b-8fd6-21b1108b573dn@googlegroups.com>
Subject: Re: C vs Haskell for XML parsing
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Sun, 27 Aug 2023 06:32:52 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Malcolm McLean - Sun, 27 Aug 2023 06:32 UTC

On Saturday, 26 August 2023 at 22:07:49 UTC+1, Richard Damon wrote:
> On 8/26/23 3:11 PM, Bart wrote:
>
> > Is that so? OK, if I look at N1750.PDF, 'fopen' does indeed have
> > parameter names, but they are 'filename' and 'mode'; I can't see any
> > underscores.
> Right, because currently, to document the function, since the names
> don't actually mean anything, they can use whatever is desired to
> document the behavior of the function.
>
> In fact, the name used in a prototype, if names are used at all, are
> meaningless to the actual function definition
>
Underscores make text hard to read. And the parameter name isn't part of
the standard. So when discussing the function, people use an easy-to-read
identifier, like "filename". If provided, the paramter name has to be surrounded
with underscores to put it into the implementation's namespace.
>
> > If so, /then/ what is the problem; that the names are ugly? That seems
> > to be par for the course for C's standard names.
> Yes, it says that to used named parameters to standard library
> functions, code would be filled with the "ugly" names.
>
That's a problem.
In fact if you said that code which #defined identifiers like "x" or "theta"
would invade implementation namespace, you would break very few
sanely written programs. But it would be a fairly big theoretical change.
But with the contract as it is, it's got to be __x or _X.

However named parameters aren't really a big help for standard library
functions. Most of them take only one or two parameters, and it's usually
easy to remember which is which. The one I can think of where it would
really help is qsort(), where it's not always easy to remember which is N
and which is width.
>
> > And it will be inefficient: structs are usually passed by reference to a
> > block of memory, so the arguments are not passed in registers.
> Depends on the API. some pass "small" structures in registers, so that
> could still work. If you have more than can be held in registers, it
> isn't that less efficent,
>
Microsoft use structures to pass large numbers of parameters to certain
functions, like ones to open a file dialog.
In reality I find that you wrap the call. You write a function which consists
of setting up the structure and assigning the fields, then calling the Microsoft
function.

Re: C vs Haskell for XML parsing

<2646917749@f172.n1.z21.fsxnet>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28244&group=comp.lang.c#28244

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: candyc...@f172.n1.z21.fsxnet (candycane)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 02:42:22 +1300
Organization: fsxNet Usenet Gateway
Message-ID: <2646917749@f172.n1.z21.fsxnet>
References: <20230826210521.20@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="21466"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: Kaz Kylheku
X-MailConverter: SoupGate-Win32 v1.05
 by: candycane - Sat, 26 Aug 2023 13:42 UTC

KK> Quick, which one is the destination?
KK>
KK> strcpy(goat: userid, fish: uid);

I'm going to guess goat?

-----------------------------------
user is generated from /dev/urandom

Re: C vs Haskell for XML parsing

<dd23e702-21e4-4aa3-ba21-613a6f1e4456n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28245&group=comp.lang.c#28245

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:a0c:b0:63d:44c5:3f37 with SMTP id dw12-20020a0562140a0c00b0063d44c53f37mr663934qvb.12.1693120720112;
Sun, 27 Aug 2023 00:18:40 -0700 (PDT)
X-Received: by 2002:ad4:4bac:0:b0:641:887b:8c36 with SMTP id
i12-20020ad44bac000000b00641887b8c36mr668104qvw.8.1693120719980; Sun, 27 Aug
2023 00:18:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Sun, 27 Aug 2023 00:18:39 -0700 (PDT)
In-Reply-To: <873505pdw0.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:a5f9:166e:840e:d1f9;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:a5f9:166e:840e:d1f9
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<ubvo4d$1tm0p$1@dont-email.me> <e9853969-42ce-48db-81e1-d37c8e4da59dn@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me> <b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me> <d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me> <d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me> <1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me> <81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me> <8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me> <639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me> <d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <efcf98fa-f078-490c-99fa-5c281cadcebbn@googlegroups.com>
<873505pdw0.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dd23e702-21e4-4aa3-ba21-613a6f1e4456n@googlegroups.com>
Subject: Re: C vs Haskell for XML parsing
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Sun, 27 Aug 2023 07:18:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 6927
 by: Malcolm McLean - Sun, 27 Aug 2023 07:18 UTC

On Sunday, 27 August 2023 at 00:45:02 UTC+1, Ben Bacarisse wrote:
> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>
> > On Friday, 25 August 2023 at 12:39:13 UTC+1, David Brown wrote:
> >> Not that either of these appeals to authority have any relevance.
> >>
> > You don't really understand the "authority" fallacy.
> > Denis Ritchie's opinion that const was a bad idea doesn't make it true that
> > const was a bad idea. His opinion that Coke is nicer than Pepsi would
> > however make it true that Coke is nicer than Pepsi, for him.
>
> So you cited DMR, the designer of the C language, simply as an example
> of one person with a preference to avoid underscores in C identifiers?
>
>
DB
>> The only thing /wrong/ - and pretty much everyone thinks it is wrong -
>> would be to call it "multiplymatrixwithvector".
>>
Malcolm
>Well Caesar disagreed.
>Denis Ritchie disagreed.
>Unfortunately I can't find it, but some reasearch on human-readable urls disagreed.

>Whilst all you can offer is "I disagree". But you automatically disagree with things
> some people say. So how much weight should we give to that?
>
Whist it is ultimately about something objective, because it's an objective statement
about human psychology, then "what everybody thinks" isn't a fallacy in the same way
that it would be if it were a claim about, for example, psychology.

Exceptions to David Brown's claim include Caesar, who would have written without
spaces, Denis Ritchie, who chose "isdigit" over is_digit, the url reasearchers I can't dig
out but I specifically remember the conclusion that hyphens made it easier for computers
to parse urls, but made it harder for humans,
>
> It could have been Kevin from accounts or Barbara finance as neither
> uses underscores in their C programs? In no way did you want to imply
> that Ritchie's opinion as a highly respected programmer and the designer
> of the language in question might carry greater weight (i.e. authority)
> on this topic? Kevin, Barbara and DMR are all equally authoritative on
> the matter of their own preferences. I find that hard to believe, but
> if you /didn't/ intend an appeal to his (often presumed) authority, then
> it was a very poor choice.
>
Its also a case that since Ritchie chose identifiers without underscores, then that
style continues, because his idnefiers are commonly seen in C source. (The point
David Brown only half understood).
But of course, yes, one of the reasons C was successful was that Ritchie was careful
in his choice of names. I do believe that people who came after have uglified things,
and done great damage to the language.
>
> As it happens, I am not with David on this. There are many matters on
> which I think an appeal to authority carries significant weight. I
> don't know DMR's opinion of underscores (the code in K&R is indicative
> but not exactly conclusive), but I would take more time considering it
> than I would Kevin's or Barbara's. It's just one way to simplify life.
>
> But maybe you cited DMR simply because could not find any other
> examples. I looked at your BBXRC code (I know it's not all yours) and I
> found lots of identifiers with underscores:
>
> only_saw_ascii_range
> le_control_chars
> be_control_chars
> null_suggests_binary_
> unexpected_null_threshold
> even_null_threshold
> TEXTENC_UTF8_BOM
> TEXTENC_ANSI
> utf16_unexpected_null_percent_
> lodepng_decode32_file
> error_exit
> out_of_memory
> opt_get
>
> and so on. Are they your choices or someone else's?
>
Some are my choices, some aren't.
BabyXRC is a standalone program which includes code from many sources,
(if you go to the webpages I attribute each file to the author). But it's not
primarily meant to be an API, so I'm not as careful in choices of interfaces
as with Baby X.
Baby X is const free, and uses the prefix bbx_ on all user-callable functions, except
for "startbabyx", and the prefix BBX_ for non-function-like macros and opaque pointers.
There's then a name in lower case, without underscores, for functions, whilst non-
functions are in all-caps.
Whilst it's not perfectly consistent (the UTF-8 functions take const char *s, for example)
it's pretty consistent, and it's designed with simplicity and ease of use as the top
priorty.
I use underscores to separate a prefix which isn't part of an English phrase, and
for a suffix like "_r" to indicate a recursive function.

I do use out_of_memory as a label very frequently. Fair point.

Then of course most of the time I don't work on my own projects. I work on code to
which other people contribute. And we have a house style, which is driven mainly by
the third party API, and capitalises each word. It's better to be consistent.

Re: C vs Haskell for XML parsing

<87wmxgdcre.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28250&group=comp.lang.c#28250

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 03:02:13 -0700
Organization: None to speak of
Lines: 18
Message-ID: <87wmxgdcre.fsf@nosuchdomain.example.com>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<JhpGM.631626$SuUf.416528@fx14.iad> <ucd871$l3b5$1@dont-email.me>
<3RpGM.755540$AsA.124161@fx18.iad> <ucdcg8$mi31$1@dont-email.me>
<_JqGM.129929$QQFb.65959@fx38.iad> <ucdip0$nn0q$1@dont-email.me>
<pQtGM.261905$uLJb.8744@fx41.iad>
<17e4272c-47f8-427b-8fd6-21b1108b573dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="f59bf797c486742749b57ed64aff336a";
logging-data="1187154"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wFYKvGcKIfWQUkn2+yAFo"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:m2UKVyZlOSaRpoaxx/GaOje8IYU=
sha1:f979t6Jp6fQOcueShzJcz7LTfCk=
 by: Keith Thompson - Sun, 27 Aug 2023 10:02 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
[...]
> However named parameters aren't really a big help for standard library
> functions. Most of them take only one or two parameters, and it's usually
> easy to remember which is which. The one I can think of where it would
> really help is qsort(), where it's not always easy to remember which is N
> and which is width.
[...]

Another example: the size and nmemb parameters of fread() and fwrite().

calloc() is almost another example, but the order of the arguments
doesn't actually matter.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: C vs Haskell for XML parsing

<627cbd87-75d6-49e9-b2e0-733ca17b7cean@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28251&group=comp.lang.c#28251

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:244:b0:76d:bea6:7ec1 with SMTP id q4-20020a05620a024400b0076dbea67ec1mr576311qkn.12.1693130730478;
Sun, 27 Aug 2023 03:05:30 -0700 (PDT)
X-Received: by 2002:a17:902:f68a:b0:1b8:91ad:79e1 with SMTP id
l10-20020a170902f68a00b001b891ad79e1mr7739557plg.11.1693130730206; Sun, 27
Aug 2023 03:05:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Sun, 27 Aug 2023 03:05:29 -0700 (PDT)
In-Reply-To: <ucdcaf$mj8h$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:a5f9:166e:840e:d1f9;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:a5f9:166e:840e:d1f9
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me> <b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me> <d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me> <d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me> <1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me> <81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me> <8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me> <639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me> <d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<j=2ifExxFfXU05g0F@bongo-ra.co> <ae3d2d4e-71bd-4c6c-99aa-cf8b6b652175n@googlegroups.com>
<87pm3bot1n.fsf@bsb.me.uk> <7a9b3883-ee9f-4d46-944c-c11d4f0354d5n@googlegroups.com>
<ucdcaf$mj8h$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <627cbd87-75d6-49e9-b2e0-733ca17b7cean@googlegroups.com>
Subject: Re: C vs Haskell for XML parsing
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Sun, 27 Aug 2023 10:05:30 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 5550
 by: Malcolm McLean - Sun, 27 Aug 2023 10:05 UTC

On Saturday, 26 August 2023 at 18:21:37 UTC+1, David Brown wrote:
> On 26/08/2023 11:55, Malcolm McLean wrote:
> > On Friday, 25 August 2023 at 19:50:42 UTC+1, Ben Bacarisse wrote:
> >> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> >>
> >>> On Friday, 25 August 2023 at 09:50:32 UTC+1, Spiros Bousbouras wrote:
> >>>> On Fri, 25 Aug 2023 01:37:38 -0700 (PDT)
> >>>> Malcolm McLean <malcolm.ar...@gmail.com> wrote:
> >>>>> Of course size_t has an underscore. Everyone knows that. And most people
> >>>>> agree that it is horrible.
> >>>> "Most people" meaning you made it up.
> >>>>
> >>> We could do a straw poll.
> >>> How many people like the underscore in size_t and how many think it is
> >>> horrible?
> >> Did you really just set up a false dichotomy to try to tip the results?
> >> The question should be simply whether you agree that it's horrible or
> >> not. You don't have to actually like it to not agree that it's
> >> horrible.
> >>
> > That's a mathematician thinking.
> Do you realise that this is a compliment? You write as though you meant
> it as criticism, but Ben's rational and logical thinking is a good thing
> - it's certainly far better than your politician "thinking".
> > "Not horrible" is the complentary set to
> > "horrible" and thus should be the other choice.
> No.
>
> The opposite of "think it is horrible" is "do not think it is horrible".
> It is not "think it is not horrible". But even that is vastly closer
> than "like it".
> > It doesn't work like that.
> I have no idea what you think "it" is, or how you think "it" might or
> might not work - but I strongly suspect you are wrong nonetheless.
> > Bascially "horrible" is a word, whilst "not horrible" is not.
> And the relevance of that is ... absolutely nothing.
>
>
> Please try again to answer Ben's question (or mine in an earlier post,
> which was much the same). Do you know what a false dichotomy is? Do
> you understand that your "straw poll" is a false dichotomy? Do you
> realise that false dichotomies are used to try to provoke an answer that
> appears to support a particular position, but does not represent a real
> model of viewpoints?
>
> Yes/no answers will do - but if you want to elaborate, please at least
> attempt to answer the questions.
>
Let's take probaly the most famous false dichotomy of all.
"Is it or is it not permissible to pay taxes to Caesar?"
According to Ben, this isn't a false dichotomy at all. Its either one or
the other.
But of course that's a totally inadequate way of looking at it.

Then take "who likes it"? In. Ben's world, there is a small class of people
in the "like" world, and a larger class of people who are not in this class,
but not in the "horrible" class either.
But yesterday my little niece said "I don't like dinosaurs".So was she saying
"I am not in the class of children who like dinosaurs?". Not really. What she
was saying was "I actively dislike dinosaurs. They offend me. Please take them
away."

Then as you yourself pointed out, there's a difference between thinking it
is "not horrible" and not thinking that it is horrible. Logically. But that's
hardly helpful.

There's far more to it than you think. If you were correct and language
worked like that, it would be easy to get computers to talk by applying a bit
of simple set theory. And of course that approach doesn't work.

Re: C vs Haskell for XML parsing

<ucf86t$14b70$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28252&group=comp.lang.c#28252

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 11:23:25 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <ucf86t$14b70$1@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<20230826123929.770@kylheku.com> <ucdp4i$ot46$1@dont-email.me>
<20230826210521.20@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 10:23:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="eaa89527a9afde9f88ac0dab313b2a1e";
logging-data="1191136"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MEeg9sxqHU+Ga0ddxQPex31eVXETu2pE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:ZhZgpGdCX3T46R/eo6coSIVfvY8=
In-Reply-To: <20230826210521.20@kylheku.com>
 by: Bart - Sun, 27 Aug 2023 10:23 UTC

On 27/08/2023 05:24, Kaz Kylheku wrote:
> On 2023-08-26, Bart <bc@freeuk.com> wrote:
>> With the feature in place, people can create their own wrapper functions
>> and make their own choices.
>
> Yikes; just what we need: people scrambling the order of arguments
> to standard functions, using their own local names.
>
> Quick, which one is the destination?
>
> strcpy(goat: userid, fish: uid);
>

That's an excellent idea, I've just changed my FFI strcpy, which hadn't
had parameter names up to now, to this:

func strcpy(ichar goat, fish="<Insert string here>")ichar

Now I can write:

strcpy(fish:"Hello", goat:str)

or even just:

strcpy(str)

Silly, but at least I can do it. The more useful, non-silly applications
outnumber the silly ones.

Remember that C's macro processor can do a LOT worse:

#define int float

#define while if

Re: C vs Haskell for XML parsing

<87ledwoeox.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28253&group=comp.lang.c#28253

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 13:25:02 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <87ledwoeox.fsf@bsb.me.uk>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <ucbjph$96fa$1@dont-email.me>
<ipdGM.457101$xMqa.238959@fx12.iad> <uccitk$hhuj$1@dont-email.me>
<H2oGM.827787$TPw2.680260@fx17.iad> <ucd5kt$kl1p$1@dont-email.me>
<JhpGM.631626$SuUf.416528@fx14.iad> <ucd871$l3b5$1@dont-email.me>
<3RpGM.755540$AsA.124161@fx18.iad> <ucdcg8$mi31$1@dont-email.me>
<_JqGM.129929$QQFb.65959@fx38.iad> <ucdip0$nn0q$1@dont-email.me>
<pQtGM.261905$uLJb.8744@fx41.iad>
<17e4272c-47f8-427b-8fd6-21b1108b573dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="9841c7ec24480b499dbe8afdd078d3f4";
logging-data="1233923"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zu3kQklQ0jbXNwldxpl4FPqm9nLuZE/4="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:Y7b3is8F3TZBITpougQJBkYSlKA=
sha1:lhOfgj1ELhweT9xiVftU+//WiFc=
X-BSB-Auth: 1.7de570061497fb967ed0.20230827132502BST.87ledwoeox.fsf@bsb.me.uk
 by: Ben Bacarisse - Sun, 27 Aug 2023 12:25 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> However named parameters aren't really a big help for standard library
> functions. Most of them take only one or two parameters, and it's usually
> easy to remember which is which. The one I can think of where it would
> really help is qsort(), where it's not always easy to remember which is N
> and which is width.

Also fread, fwrite and the largely forgotten bsearch. To make matters
worse, fread and fwrite go the other way to qsort and bsearch, and you
don't get any diagnostics since the types of the two counts are the
same. You might, for example, get the position of the 'end pointer'
argument to strtol wrong, but you'll usually get a warning about it.

--
Ben.

Re: C vs Haskell for XML parsing

<ucftjs$186cs$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28258&group=comp.lang.c#28258

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 18:28:44 +0200
Organization: A noiseless patient Spider
Lines: 91
Message-ID: <ucftjs$186cs$1@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<j=2ifExxFfXU05g0F@bongo-ra.co>
<ae3d2d4e-71bd-4c6c-99aa-cf8b6b652175n@googlegroups.com>
<87pm3bot1n.fsf@bsb.me.uk>
<7a9b3883-ee9f-4d46-944c-c11d4f0354d5n@googlegroups.com>
<ucdcaf$mj8h$1@dont-email.me>
<627cbd87-75d6-49e9-b2e0-733ca17b7cean@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 16:28:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="09710c0d7f4cb120cf61093dd0f1580b";
logging-data="1317276"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bzhCzzURLYG+Dvkw59YJxfJ/ysWFjwVs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:zypzmKzhPzZbCeqqdj/WZHaNNYI=
Content-Language: en-GB
In-Reply-To: <627cbd87-75d6-49e9-b2e0-733ca17b7cean@googlegroups.com>
 by: David Brown - Sun, 27 Aug 2023 16:28 UTC

On 27/08/2023 12:05, Malcolm McLean wrote:
> On Saturday, 26 August 2023 at 18:21:37 UTC+1, David Brown wrote:
>> On 26/08/2023 11:55, Malcolm McLean wrote:
>>> On Friday, 25 August 2023 at 19:50:42 UTC+1, Ben Bacarisse wrote:
>>>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>>>
>>>>> On Friday, 25 August 2023 at 09:50:32 UTC+1, Spiros Bousbouras wrote:
>>>>>> On Fri, 25 Aug 2023 01:37:38 -0700 (PDT)
>>>>>> Malcolm McLean <malcolm.ar...@gmail.com> wrote:
>>>>>>> Of course size_t has an underscore. Everyone knows that. And most people
>>>>>>> agree that it is horrible.
>>>>>> "Most people" meaning you made it up.
>>>>>>
>>>>> We could do a straw poll.
>>>>> How many people like the underscore in size_t and how many think it is
>>>>> horrible?
>>>> Did you really just set up a false dichotomy to try to tip the results?
>>>> The question should be simply whether you agree that it's horrible or
>>>> not. You don't have to actually like it to not agree that it's
>>>> horrible.
>>>>
>>> That's a mathematician thinking.
>> Do you realise that this is a compliment? You write as though you meant
>> it as criticism, but Ben's rational and logical thinking is a good thing
>> - it's certainly far better than your politician "thinking".
>>> "Not horrible" is the complentary set to
>>> "horrible" and thus should be the other choice.
>> No.
>>
>> The opposite of "think it is horrible" is "do not think it is horrible".
>> It is not "think it is not horrible". But even that is vastly closer
>> than "like it".
>>> It doesn't work like that.
>> I have no idea what you think "it" is, or how you think "it" might or
>> might not work - but I strongly suspect you are wrong nonetheless.
>>> Bascially "horrible" is a word, whilst "not horrible" is not.
>> And the relevance of that is ... absolutely nothing.
>>
>>
>> Please try again to answer Ben's question (or mine in an earlier post,
>> which was much the same). Do you know what a false dichotomy is? Do
>> you understand that your "straw poll" is a false dichotomy? Do you
>> realise that false dichotomies are used to try to provoke an answer that
>> appears to support a particular position, but does not represent a real
>> model of viewpoints?
>>
>> Yes/no answers will do - but if you want to elaborate, please at least
>> attempt to answer the questions.
>>
> Let's take probaly the most famous false dichotomy of all.

No, let's not. Let's try to answer the questions at hand. Should I
assume you can't answer them?

> "Is it or is it not permissible to pay taxes to Caesar?"
> According to Ben, this isn't a false dichotomy at all. Its either one or
> the other.

I haven't noticed Ben making any comment on that question. Would you
like to give a reference to his post? Or an accurate quotation?

And of course it has absolutely nothing to do with the fact that what
/you/ asked as your "straw poll" was absolutely and clearly a false
dichotomy.

> But of course that's a totally inadequate way of looking at it.
>
> Then take "who likes it"? In. Ben's world, there is a small class of people
> in the "like" world, and a larger class of people who are not in this class,
> but not in the "horrible" class either.

Again, you are inventing things that Ben did not say.

But /I/ said something to that effect. And since there are undoubtedly
three classes here (lots of people have put themselves in the "like"
group, you and Bart are in the "horrible" group, while Scott has, I
think, placed himself in the "don't care" group), then there is no doubt
that your question was a false dichotomy.

>
> There's far more to it than you think. If you were correct and language
> worked like that, it would be easy to get computers to talk by applying a bit
> of simple set theory. And of course that approach doesn't work.

Making vague and useless comments about how complicated human language
can be (as if it were something that you knew, and the rest of us do
not) does not let you off the hook for getting things wrong, trying to
con people with fallacious arguments, and being unable to own up to it.

Re: C vs Haskell for XML parsing

<ucfu89$18cb9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28259&group=comp.lang.c#28259

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 18:39:36 +0200
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <ucfu89$18cb9$1@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<87h6onfje9.fsf@nosuchdomain.example.com>
<66653005-66fa-4a89-8b1f-0b415fb7e8ean@googlegroups.com>
<yJnGM.142651$ftCb.40495@fx34.iad>
<03a4b2f0-92a7-4652-86f6-66f7d5cf8853n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 16:39:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="09710c0d7f4cb120cf61093dd0f1580b";
logging-data="1323369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gmxqIzy0ESyhMWSBy6azNE1Y4HcszglU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:C1Wt7Y8sa0NF6EJ7fpocU9l3fs0=
In-Reply-To: <03a4b2f0-92a7-4652-86f6-66f7d5cf8853n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Sun, 27 Aug 2023 16:39 UTC

On 27/08/2023 07:54, Malcolm McLean wrote:
> On Saturday, 26 August 2023 at 15:10:54 UTC+1, Scott Lurndal wrote:
>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>> On Friday, 25 August 2023 at 12:31:44 UTC+1, Keith Thompson wrote:
>>>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>>>> On Friday, 25 August 2023 at 08:46:22 UTC+1, David Brown wrote:
>>>> [...]
>>>>>> The only thing /wrong/ - and pretty much everyone thinks it is wrong -
>>>>>> would be to call it "multiplymatrixwithvector".
>>>>>>
>>>>> Well Caesar disagreed.
>>>> Let's drop the lengthy discussions of ancient writing systems, shall we?
>>>> (And David, please stop encouraging them.)
>>>>
>>> For about two thousand years, text was written without spaces. Any rational
>>> person, to whom this was pointed out, would accept that that is prima facie
>>> evidence that it is not that difficult to read.
>> The sources I found indicate that it wasn't intended to be read by anyone
>> other than the person who wrote it.
>>
> Just goes to show that you can believe everything you read.

That's a non-sequitur, as well as almost certainly a typo, making your
non-grammatical almost-sentence say the opposite of what you intended.

Wikipedia has a list of logical fallacies used in arguments. You've
gone through quite a few of them so far - are you trying to get them all
ticked off in one thread?

> Do you think that is remotely plausible?

Often, but certainly not always, things were written with the intention
of being read by the author.

This, of course, still applies today - much of what is written is notes
for your own benefit, thus it is not a problem that many people's
handwriting is practically illegible to others. Second on the list of
perspective readers is probably teachers, and third would be "nobody"
(we all know that most likely no one will ever really read the
documentation we write for our software). Writing things that are
actually read by anyone else has always been a minority of writing (even
though it is, obviously, a very important part of writing).

Re: C vs Haskell for XML parsing

<ucfuck$18cb9$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28260&group=comp.lang.c#28260

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 18:41:56 +0200
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <ucfuck$18cb9$2@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me>
<b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<87h6onfje9.fsf@nosuchdomain.example.com>
<66653005-66fa-4a89-8b1f-0b415fb7e8ean@googlegroups.com>
<ucdcsr$mj8h$3@dont-email.me>
<bc75d61f-66a7-4132-9fd0-7c3eda49fe8bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 16:41:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="09710c0d7f4cb120cf61093dd0f1580b";
logging-data="1323369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18eLRtZFgNqNwS4AokdJooFdHkL123xh5I="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:6Zzlw6V1ahEki0h4iMXNGaX2X3E=
In-Reply-To: <bc75d61f-66a7-4132-9fd0-7c3eda49fe8bn@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Sun, 27 Aug 2023 16:41 UTC

On 27/08/2023 08:08, Malcolm McLean wrote:
> On Saturday, 26 August 2023 at 18:31:21 UTC+1, David Brown wrote:

>> I enjoy talking about history, and I happen to know a bit about writing
>> systems - modern and outdated. I had hoped, since you know a bit of
>> Hebrew and have looked at old texts, that I might have learned something
>> new. But I was wrong - you have some basic knowledge combined with some
>> flat-earth ideas, and you haven't actually bothered reading what I
>> wrote. So time to stop, I think.
>>
> I know. But it irritates Keith. And it's very tangential to C, so he has a case.

I fully agree. I expect it annoys more than just Keith, though he is
often the one open enough to talk about it. So let's stop talking about it.

Re: C vs Haskell for XML parsing

<ucfusp$18cb9$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28261&group=comp.lang.c#28261

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 18:50:33 +0200
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <ucfusp$18cb9$3@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<3c87ec37-8fe1-4171-9500-609fad6701b7n@googlegroups.com>
<ubvo4d$1tm0p$1@dont-email.me>
<e9853969-42ce-48db-81e1-d37c8e4da59dn@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me>
<b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 16:50:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="09710c0d7f4cb120cf61093dd0f1580b";
logging-data="1323369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18L1U2XX0K1QWvF8yaXQb0xr5meTmAWdXw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:6PatTLhUgx2PJX3jFvwiRfiJ1gc=
Content-Language: en-GB
In-Reply-To: <878r9zeynn.fsf@nosuchdomain.example.com>
 by: David Brown - Sun, 27 Aug 2023 16:50 UTC

On 25/08/2023 20:59, Keith Thompson wrote:
> David Brown <david.brown@hesbynett.no> writes:
>> On 25/08/2023 10:37, Malcolm McLean wrote:
>>> On Friday, 25 August 2023 at 08:46:22 UTC+1, David Brown wrote:
> [...]
>>>> There are good historical reasons for why named parameters are not
>>>> common in older languages, but are more common in newer ones. And there
>>>> are good technical reasons why they would be difficult to introduce to C
>>>> as an afterthought. But I agree with you that they can be helpful and
>>>> improve code readability, in languages that support them.
>>>>
>>> I don't really see what the technical problem is. The header would have to
>>> contain the names of the parameters (most do already). Then instead
>>> of putting parameter 1 into register a and parameter 2 into register b,
>>> the compiler matches them up. If its void foo(int x, int y) and the
>>> call is foo(y=1, x=2), then the compiler puts a 2 into register a and a 1
>>> into register b.
>>> I haven't tried to modify a compiler to do this so there might be something I
>>> haven't thought of. But it would be a fairly simple, contained change with no
>>> implications for the linker.
>>
>> The key technical problem for C is that the parameter names are not
>> part of the signature of the function. It is not uncommon for
>> declarations to have missing parameter names, or different names from
>> those uses in the definition of the function. (Sometimes there are
>> good reasons for this, sometimes it is laziness.) If a function is
>> defined as "void foo(int a, int b) { .. }", but the declaration used
>> to call it has "void foo(int b, int a);", then how should named
>> parameters be resolved?
>>
>> Any resolution here would place restrictions on which functions could
>> support named parameters - such as consistent declarations and
>> definitions, but it would be impossible (in general) to check them.
>
> Any parameter names in a call would just have to be consistent with the
> names in the visible prototype. I don't see a problem.
>

You can have both "void foo(int a, int b);" and "void foo(int b, int
a);" declarations visible at the same time.

And if one translation unit defined "void foo(int a, int b);", while
another declared "void foo(int b, int a);" and used that with named
parameters, you would not get the correct call.

If you required the compiler to enforce that all declarations and
definitions of a function used the same parameter names, then you'd do
much better. (There is still scope for errors, but would be basically
the same as we have today for calling functions with incorrect numbers
or types of arguments.) But that would conflict with existing code that
was valid before.

So you'd need a new syntax to say that a function must have all its
declarations having consistent parameter names. You'd have to write
"void foo(int a static, int b static);" !

> Using the "name=value" syntax would conflict with the use of an
> assignment expression as an argument, so some new syntax would have to
> be invented.
>
> I know, we could reuse the "static" keyword! 8-)}
>
> [...]
>

Re: C vs Haskell for XML parsing

<ucfv6n$18cb9$4@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28262&group=comp.lang.c#28262

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 18:55:51 +0200
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <ucfv6n$18cb9$4@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<e9853969-42ce-48db-81e1-d37c8e4da59dn@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me>
<b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me> <878r9zeynn.fsf@nosuchdomain.example.com>
<AUaGM.174236$JG_b.91752@fx39.iad> <874jkmfyqp.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 16:55:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="09710c0d7f4cb120cf61093dd0f1580b";
logging-data="1323369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Aqunf1TiT0W+AXDDlM6VKY6FAUGHTFuQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:FKJ7bmcb4wvIVfr7AceEyjHhymQ=
In-Reply-To: <874jkmfyqp.fsf@nosuchdomain.example.com>
Content-Language: en-GB
 by: David Brown - Sun, 27 Aug 2023 16:55 UTC

On 26/08/2023 02:12, Keith Thompson wrote:
> Richard Damon <Richard@Damon-Family.org> writes:
>> On 8/25/23 2:59 PM, Keith Thompson wrote:
> [...]
>>> Any parameter names in a call would just have to be consistent with
>>> the names in the visible prototype. I don't see a problem. Using
>>> the "name=value" syntax would conflict with the use of an assignment
>>> expression as an argument, so some new syntax would have to be
>>> invented.
>>>
>>> I know, we could reuse the "static" keyword! 8-)}
>>> [...]
>>>
>>
>> As far as I know, C could still adopt the use of : for this purpose,
>> like Bart's language does.
>>
>> I can't think of anything that this would get confused with.
>
> Nor can I.
>
>> I think the biggest thing this would require is that every standard
>> library function would need to have the name used for its parameter
>> defined (or the standard say you can't portably use them with the
>> standard library functions.
>
> The standard already shows parameter names for library functions, though
> they're not currently semantically meaningful. If this feature were
> added in a future standard, the same names could be used.
>

The parameter names are not reserved identifiers - so someone could write:

#define s1 Surprise!
#define s2 This is going to cause trouble...

#include <string.h>

A declaration of "strcpy" that used parameter names "s1" and "s2" would
then be problematic.

I wonder if it would be possible for compilers to have a pre-processor
directive to turn off user-defined macros while processing system
headers? That would solve this issue. (It would probably be easier to
wait until the C++ has had some practice with modules and worked out the
kinks, then copy modules into C.)

>> I think the biggest issue there is that the names would need to be
>> somewhat ugle as they would need to be in the implementation reserved
>> namespace, as anything in the user namespace might be a macro
>
> I'm not sure that would be much of a problem. For example, given
> char *strcpy(char * restrict s1,
> const char * restrict s2);
> and a call like:
> strcpy(s1: foo, s2: bar);
> the lookup for the names s1 and s2 would refer only to the named
> parameters of the called function. If you define a macro "s1", you
> simply get whatever it expands to.
>
> Another issue is that library functions can additionally be defined as
> macros. One solution would be to say that if you use a named parameter
> association, it bypasses the macro and calls the function -- which could
> break some contrived macro invocations. Another would be to allow named
> parameter associations for macro invocations as well as function calls.
>

Re: C vs Haskell for XML parsing

<87cyz8o253.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28263&group=comp.lang.c#28263

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 17:56:08 +0100
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <87cyz8o253.fsf@bsb.me.uk>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me>
<b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me>
<efcf98fa-f078-490c-99fa-5c281cadcebbn@googlegroups.com>
<873505pdw0.fsf@bsb.me.uk>
<dd23e702-21e4-4aa3-ba21-613a6f1e4456n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="9841c7ec24480b499dbe8afdd078d3f4";
logging-data="1328522"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GRETjm8ZQAjjQkOQxa2d9ThaB88+3Bss="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:3OlgUQO9gczUfiwH99sRh7ohQYM=
sha1:sVOtR7s2e+4+etUhibMVlorExos=
X-BSB-Auth: 1.bcaf2b3c9aae5a2a8816.20230827175608BST.87cyz8o253.fsf@bsb.me.uk
 by: Ben Bacarisse - Sun, 27 Aug 2023 16:56 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

>> ... I looked at your BBXRC code (I know it's not all yours) and I
>> found lots of identifiers with underscores:
>>
>> only_saw_ascii_range
>> le_control_chars
>> be_control_chars
>> null_suggests_binary_
>> unexpected_null_threshold
>> even_null_threshold
>> TEXTENC_UTF8_BOM
>> TEXTENC_ANSI
>> utf16_unexpected_null_percent_
>> lodepng_decode32_file
>> error_exit
>> out_of_memory
>> opt_get
>>
>> and so on. Are they your choices or someone else's?
>>
> Some are my choices, some aren't.

It's odd (to me) that you chose /any/ since you are so sure they are a
bad idea for readability.

> Baby X is const free, and uses the prefix bbx_ on all user-callable
> functions,

You will note I did not pick any with a "bbx_" prefix because you had
explained that already. You have quite a collection of prefixes (bbx_,
xml_, opt_) as well as some sub-prefixes like utf8_. The result is a
fair few underscores.

> I use underscores to separate a prefix which isn't part of an English
> phrase, and for a suffix like "_r" to indicate a recursive function.

Why do you think they help with prefixes and suffixes but not also with
words? To me, both are uses are just separating parts.

> I do use out_of_memory as a label

.... and, it would appear, error_exit and parse_error. In fact I did not
see a label without an underscore.

> very frequently. Fair point.

Despite "knowing" that it's harder to read?

--
Ben.

Re: C vs Haskell for XML parsing

<ucg03q$18cb9$5@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28264&group=comp.lang.c#28264

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: C vs Haskell for XML parsing
Date: Sun, 27 Aug 2023 19:11:22 +0200
Organization: A noiseless patient Spider
Lines: 90
Message-ID: <ucg03q$18cb9$5@dont-email.me>
References: <576801fa-2842-40dc-bf19-221a5b1cf660n@googlegroups.com>
<ubvo4d$1tm0p$1@dont-email.me>
<e9853969-42ce-48db-81e1-d37c8e4da59dn@googlegroups.com>
<uc28id$2dc7f$1@dont-email.me>
<b21393a6-c4f5-436a-9975-8ffedd6bf20bn@googlegroups.com>
<uc2dbv$2e4tg$1@dont-email.me>
<d734d616-b18e-4e67-b858-f0eb0a636a87n@googlegroups.com>
<uc2qnl$2gh96$1@dont-email.me>
<d651e08e-033d-4a90-8477-6a5fa13d30f3n@googlegroups.com>
<uc4e4t$2rdlt$1@dont-email.me>
<1e79f8a1-b707-4074-b272-ce4327ee7bc0n@googlegroups.com>
<uc5dd0$30jrk$1@dont-email.me>
<81879984-43e7-409a-a029-1ca6677f536dn@googlegroups.com>
<uc5mlk$32gl3$1@dont-email.me>
<8eec8404-4928-4bc3-8b00-c673ea22ab60n@googlegroups.com>
<uc7l4o$3fp72$1@dont-email.me>
<639e8e6f-2729-476b-9a6e-0b3eb066b06an@googlegroups.com>
<uc9m7v$3u797$1@dont-email.me>
<d3c6df71-7ef5-4fd3-83be-8b9a4315f0c4n@googlegroups.com>
<uca3sh$p9c$1@dont-email.me>
<efcf98fa-f078-490c-99fa-5c281cadcebbn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 27 Aug 2023 17:11:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="09710c0d7f4cb120cf61093dd0f1580b";
logging-data="1323369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wlXOQbtSaRN2SZe2PGAXQitds5n8Ib4s="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:3PGRedp2WGveyn8KH8lLs4yYGhA=
Content-Language: en-GB
In-Reply-To: <efcf98fa-f078-490c-99fa-5c281cadcebbn@googlegroups.com>
 by: David Brown - Sun, 27 Aug 2023 17:11 UTC

On 26/08/2023 08:38, Malcolm McLean wrote:
> On Friday, 25 August 2023 at 12:39:13 UTC+1, David Brown wrote:
>>
>> Ritchie didn't use long identifiers much - and when he did, he used
>> underscores.
>>
> Here's some code by K and R. Either by Ritchie or agreed to by Ritchie.
>
> #include <stdio.h>
> #define MAXLINE 1000 /* maximum input line length */
> int getline(char line[], int max)
> int strindex(char source[], char searchfor[]);
> char pattern[] = "ould"; /* pattern to search for */
> /* find all lines matching pattern */
> main()
> {
> char line[MAXLINE];
> int found = 0;
> while (getline(line, MAXLINE) > 0)
> if (strindex(line, pattern) >= 0) {
> printf("%s", line);
> found++;
> }
> return found;
> }
> /* getline: get line into s, return length */
> int getline(char s[], int lim)
> {
> int c, i;
> i = 0;
> while (--lim > 0 && (c=getchar()) != EOF && c != '\n')
> s[i++] = c;
> if (c == '\n')
> s[i++] = c;
> s[i] = '\0';
> return i;
> }
> /* strindex: return index of t in s, -1 if none */
> int strindex(char s[], char t[])
> {
> int i, j, k;
> for (i = 0; s[i] != '\0'; i++) {
> for (j=i, k=0; t[k]!='\0' && s[j]==t[k]; j++, k++)
> 61
> ;
> if (k > 0 && t[k] == '\0')
> return i;
> }
> return -1;
> }
>
> You see quite clearly that the style used is to avoid underscores.

No, I see this style quite clearly fits exactly with the description I
gave. I see no evidence at all that the style used was avoiding
underscores - I only see evidence that in this piece of code, no
underscores were needed because all the identifiers were short. (It's
already been explained to you why identifiers were kept short in older
code.)

>>
>> Not that either of these appeals to authority have any relevance.
>>
> You don't really understand the "authority" fallacy.

Yes, I do. Perhaps you do too, but you failed to understand what you
wrote yourself and why it was an "appeal to authority" fallacy.

> Denis Ritchie's opinion that const was a bad idea doesn't make it true that
> const was a bad idea. His opinion that Coke is nicer than Pepsi would
> however make it true that Coke is nicer than Pepsi, for him.
>
> See the difference?

I understand that fine.

But you didn't discuss Ritchie's style to say what he personally
preferred (which is good, because you haven't the faintest idea what
style he would have preferred given modern tools and doing modern coding).

You brought up his style as justification for your insane theory that
underscores make long identifiers harder to read. /That/ was an appeal
to authority - and a silly one, since you had no evidence that your
authority agrees with you in this case.

Do /you/ see the difference?


devel / comp.lang.c / Re: C vs Haskell for XML parsing

Pages:123456789101112
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor