Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"You shouldn't make my toaster angry." -- Household security explained in "Johnny Quest"


devel / comp.lang.c / Re: How About Disallowing Assignments In Expressions?

SubjectAuthor
* How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
+* Re: How About Disallowing Assignments In Expressions?Malcolm McLean
|`* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| `- Re: How About Disallowing Assignments In Expressions?Tim Rentsch
+- Re: How About Disallowing Assignments In Expressions?Kaz Kylheku
+* Re: How About Disallowing Assignments In Expressions?David Brown
|+* Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
||+* Re: How About Disallowing Assignments In Expressions?Richard Harnden
|||`* Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
||| `* Re: How About Disallowing Assignments In Expressions?Richard Harnden
|||  `* Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
|||   `* Re: How About Disallowing Assignments In Expressions?Malcolm McLean
|||    `* Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
|||     `- Re: How About Disallowing Assignments In Expressions?Malcolm McLean
||`* Re: How About Disallowing Assignments In Expressions?David Brown
|| +* Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
|| |`- Re: How About Disallowing Assignments In Expressions?David Brown
|| `- Re: How About Disallowing Assignments In Expressions?Janis Papanagnou
|+- Re: How About Disallowing Assignments In Expressions?Kaz Kylheku
|`* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| +* Re: How About Disallowing Assignments In Expressions?Malcolm McLean
| |+- Re: How About Disallowing Assignments In Expressions?Keith Thompson
| |`* Re: How About Disallowing Assignments In Expressions?bart
| | +* Re: How About Disallowing Assignments In Expressions?fir
| | |`- Re: How About Disallowing Assignments In Expressions?fir
| | `* Re: How About Disallowing Assignments In Expressions?fir
| |  `* Re: How About Disallowing Assignments In Expressions?fir
| |   +- Re: How About Disallowing Assignments In Expressions?fir
| |   `- Re: How About Disallowing Assignments In Expressions?fir
| +* Re: How About Disallowing Assignments In Expressions?Kaz Kylheku
| |+- Re: How About Disallowing Assignments In Expressions?Keith Thompson
| |`* Re: How About Disallowing Assignments In Expressions?bart
| | +- Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | `- Re: How About Disallowing Assignments In Expressions?Kaz Kylheku
| +- Re: How About Disallowing Assignments In Expressions?David Brown
| +* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| |+- Re: How About Disallowing Assignments In Expressions?fir
| |`* Re: How About Disallowing Assignments In Expressions?Kaz Kylheku
| | `* Re: How About Disallowing Assignments In Expressions?dave thompson 2
| |  +* Re: How About Disallowing Assignments In Expressions?Janis Papanagnou
| |  |`- Re: How About Disallowing Assignments In Expressions?bart
| |  `- Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| +* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| |+* Re: How About Disallowing Assignments In Expressions?Kaz Kylheku
| ||`* Re: How About Disallowing Assignments In Expressions?David Brown
| || `- Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| |+* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| ||`* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| || `* Re: How About Disallowing Assignments In Expressions?David Brown
| ||  +* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| ||  |`- Re: How About Disallowing Assignments In Expressions?David Brown
| ||  `- Re: How About Disallowing Assignments In Expressions?Janis Papanagnou
| |`* Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
| | +* Re: How About Disallowing Assignments In Expressions?David Brown
| | |+* Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
| | ||+- Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
| | ||+* Re: How About Disallowing Assignments In Expressions?bart
| | |||`- Re: How About Disallowing Assignments In Expressions?David Brown
| | ||+- Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | ||`- Re: How About Disallowing Assignments In Expressions?David Brown
| | |`* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | | `* Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
| | |  +* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | |  |`* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  | `* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | |  |  `* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   +* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | |  |   |`* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   | `* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | |  |   |  `* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   |   +* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   |   |`* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |   |   | `* Re: How About Disallowing Assignments In Expressions?bart
| | |  |   |   |  `* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |   |   |   +* Re: How About Disallowing Assignments In Expressions?bart
| | |  |   |   |   |`* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |   |   |   | `- Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   |   |   `* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   |   |    `- Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |   |   `* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | |  |   |    +- Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   |    `* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |   |     `* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | |  |   |      +* Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   |      |`* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | |  |   |      | +- Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
| | |  |   |      | `- Re: How About Disallowing Assignments In Expressions?Keith Thompson
| | |  |   |      `- Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |   `* Re: How About Disallowing Assignments In Expressions?Malcolm McLean
| | |  |    `* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |     +* Re: How About Disallowing Assignments In Expressions?Malcolm McLean
| | |  |     |`* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |     | `* Re: How About Disallowing Assignments In Expressions?Malcolm McLean
| | |  |     |  `* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |     |   `* Re: How About Disallowing Assignments In Expressions?Malcolm McLean
| | |  |     |    `* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |     |     +* Re: How About Disallowing Assignments In Expressions?Malcolm McLean
| | |  |     |     |`- Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |     |     `* Re: How About Disallowing Assignments In Expressions?bart
| | |  |     |      +- Re: How About Disallowing Assignments In Expressions?Ben Bacarisse
| | |  |     |      `* Re: How About Disallowing Assignments In Expressions?David Brown
| | |  |     +* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | |  |     `* Re: How About Disallowing Assignments In Expressions?Janis Papanagnou
| | |  `* Re: How About Disallowing Assignments In Expressions?David Brown
| | +* Re: How About Disallowing Assignments In Expressions?Lawrence D'Oliveiro
| | `- Re: How About Disallowing Assignments In Expressions?Keith Thompson
| +- Re: How About Disallowing Assignments In Expressions?Janis Papanagnou
| `* Re: How About Disallowing Assignments In Expressions?Michael S
+* Re: How About Disallowing Assignments In Expressions?bart
+* Re: How About Disallowing Assignments In Expressions?Blue-Maned_Hawk
+- Re: How About Disallowing Assignments In Expressions?Richard Kettlewell
`* Re: How About Disallowing Assignments In Expressions?Thiago Adams

Pages:123456789101112131415161718192021
Re: How About Disallowing Assignments In Expressions?

<uquk53$1mqmr$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 05:06:59 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uquk53$1mqmr$2@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq4nmb$2hive$6@dont-email.me>
<87r0hlef8q.fsf@nosuchdomain.example.com> <uq6nha$2spqe$3@dont-email.me>
<87sf20o4e2.fsf@bsb.me.uk> <uq8quh$3padl$13@dont-email.me>
<uqag7k$v4d8$8@dont-email.me> <uqg4h6$25gc3$1@dont-email.me>
<uqg5mn$25m88$1@dont-email.me> <uqh12g$2akab$1@dont-email.me>
<87a5o3amit.fsf@nosuchdomain.example.com> <20240214120232.00001d56@yahoo.com>
<Bm5zN.88069$GX69.22371@fx46.iad> <871q9f9go2.fsf@nosuchdomain.example.com>
<867cj61ckn.fsf@linuxsc.com> <87bk8i8ci1.fsf@nosuchdomain.example.com>
<86plwuy6n5.fsf@linuxsc.com> <87ttm67g76.fsf@nosuchdomain.example.com>
<uqrq0g$n43b$4@dont-email.me> <uqso32$10l39$3@dont-email.me>
<uqt4c6$16af9$1@dont-email.me> <uqtfkq$1cbg5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 04:06:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4fc7aa5fa691771cf05c2d3e725d1c5a";
logging-data="1796827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fFaMlU3bee2PYOy510KY/"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:AXnh0mcunMwvrTGDDARIculeb8g=
In-Reply-To: <uqtfkq$1cbg5$1@dont-email.me>
 by: Janis Papanagnou - Mon, 19 Feb 2024 04:06 UTC

On 18.02.2024 18:43, Malcolm McLean wrote:
> On 18/02/2024 14:31, Janis Papanagnou wrote:
>>
>> But you don't "manipulate" hierarchies with a dynamic_cast;
>>
> So "manipulate" is the wrong word. You can't create or modify a
> hierarchy with a cast. But you can obtain access to members in strange
> ways.

Okay. - Only I cannot guess in what way it appears strange to you.

Janis

Re: How About Disallowing Assignments In Expressions?

<uqukju$1mugr$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 05:14:53 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uqukju$1mugr$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq4nmb$2hive$6@dont-email.me>
<87r0hlef8q.fsf@nosuchdomain.example.com> <uq6nha$2spqe$3@dont-email.me>
<87sf20o4e2.fsf@bsb.me.uk> <uq8quh$3padl$13@dont-email.me>
<uqag7k$v4d8$8@dont-email.me> <uqg4h6$25gc3$1@dont-email.me>
<uqg5mn$25m88$1@dont-email.me> <uqh12g$2akab$1@dont-email.me>
<87a5o3amit.fsf@nosuchdomain.example.com> <20240214120232.00001d56@yahoo.com>
<Bm5zN.88069$GX69.22371@fx46.iad> <871q9f9go2.fsf@nosuchdomain.example.com>
<867cj61ckn.fsf@linuxsc.com> <87bk8i8ci1.fsf@nosuchdomain.example.com>
<86plwuy6n5.fsf@linuxsc.com> <87ttm67g76.fsf@nosuchdomain.example.com>
<uqrq0g$n43b$4@dont-email.me> <uqso32$10l39$3@dont-email.me>
<uqt4c6$16af9$1@dont-email.me> <uqtv6i$1fckl$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 04:14:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4fc7aa5fa691771cf05c2d3e725d1c5a";
logging-data="1800731"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Bv5b5hfgRd7rx2MKi9oi5"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:QuLLVdUMwv+Q4hBGy93E5SBG1Ac=
In-Reply-To: <uqtv6i$1fckl$3@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Mon, 19 Feb 2024 04:14 UTC

On 18.02.2024 23:09, Lawrence D'Oliveiro wrote:
> On Sun, 18 Feb 2024 15:31:33 +0100, Janis Papanagnou wrote:
>
>> On 18/02/2024 02:28, Lawrence D'Oliveiro wrote:
>>
>>> This is why C++ defined four different kinds of casting.
>>
>> It was certainly good to separate the different types of casts.
>
> Also, they had distinctive names that could be searched for in the code.

Indeed. - That's why I wrote explicitly (you snipped that part)...

>> The separation of casts in C++ helps locating critical places.

....where "locating" meant what you also expressed with "searched".

>> (In C with the two parenthesis syntaxes that was a nightmare.)

BTW; a mistake of mine was to write inaccurately "C with the two
parenthesis syntaxes"; it was, I think, C++ that added the second
form that made it possible that a cast looks like a function call.
Frankly, I don't know whether C also added that.

Janis

Re: How About Disallowing Assignments In Expressions?

<uquo1q$1ncfn$5@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 05:13:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uquo1q$1ncfn$5@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq4nmb$2hive$6@dont-email.me>
<87r0hlef8q.fsf@nosuchdomain.example.com> <uq6nha$2spqe$3@dont-email.me>
<87sf20o4e2.fsf@bsb.me.uk> <uq8quh$3padl$13@dont-email.me>
<uqag7k$v4d8$8@dont-email.me> <uqg4h6$25gc3$1@dont-email.me>
<uqg5mn$25m88$1@dont-email.me> <uqh12g$2akab$1@dont-email.me>
<87a5o3amit.fsf@nosuchdomain.example.com>
<20240214120232.00001d56@yahoo.com> <Bm5zN.88069$GX69.22371@fx46.iad>
<871q9f9go2.fsf@nosuchdomain.example.com> <867cj61ckn.fsf@linuxsc.com>
<87bk8i8ci1.fsf@nosuchdomain.example.com> <86plwuy6n5.fsf@linuxsc.com>
<87ttm67g76.fsf@nosuchdomain.example.com> <uqrq0g$n43b$4@dont-email.me>
<uqso32$10l39$3@dont-email.me> <uqt4c6$16af9$1@dont-email.me>
<uqtv6i$1fckl$3@dont-email.me> <uqukju$1mugr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 05:13:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ddd376f1c1df309f4c794f01086d8954";
logging-data="1815031"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7VXM9rub2Dh3BadzRdREd"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:umrcF8aTBB7G1sEhroVGpMHC9wI=
 by: Lawrence D'Oliv - Mon, 19 Feb 2024 05:13 UTC

On Mon, 19 Feb 2024 05:14:53 +0100, Janis Papanagnou wrote:

> On 18.02.2024 23:09, Lawrence D'Oliveiro wrote:
>
>> Also, they had distinctive names that could be searched for in the
>> code.
>
> Indeed. - That's why I wrote explicitly (you snipped that part)...
>
>>> The separation of casts in C++ helps locating critical places.
>
> ...where "locating" meant what you also expressed with "searched".

You didn’t say how; I did.

Re: How About Disallowing Assignments In Expressions?

<uquo8c$1ncfn$6@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 05:17:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <uquo8c$1ncfn$6@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu4la$1gg86$5@dont-email.me>
<87zfvxfbe4.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 05:17:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ddd376f1c1df309f4c794f01086d8954";
logging-data="1815031"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GnDMf5N12wBK8yfDoi+VT"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:k/IFHif/QdAfD/blG2vpgF9ue4g=
 by: Lawrence D'Oliv - Mon, 19 Feb 2024 05:17 UTC

On Mon, 19 Feb 2024 02:14:43 +0000, Ben Bacarisse wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> On Sun, 18 Feb 2024 22:34:06 +0000, Ben Bacarisse wrote:
>>
>>> ... brackets, orders ...
>>
>> “Of” (implied multiplication), not “orders”.
>
> You may have been taught that (why?) but an online search suggests that
> that is not what gets taught.

I’m not sure why. Given that exponentiation is conventionally denoted by
placement, e.g.

b + c
a

there cannot possibly be any ambiguity about how the binding is supposed
to work. Unlike, for example, this case:

a ÷ b(c + d)

versus

a ÷ b × (c + d)

Re: How About Disallowing Assignments In Expressions?

<uquob7$1ncfn$7@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 05:18:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <uquob7$1ncfn$7@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq93m2$3g3f$2@dont-email.me>
<8734tzoli4.fsf@bsb.me.uk> <uq979e$40n1$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uqlerj$3crk6$1@dont-email.me>
<uqmd23$3hv8k$5@dont-email.me> <uqn4bd$3ovo5$1@dont-email.me>
<uqopsh$25h4$8@dont-email.me> <87y1bj7v0v.fsf@nosuchdomain.example.com>
<uqq3rt$cdvf$1@dont-email.me> <uqrqc2$n43b$6@dont-email.me>
<uqt60g$16rno$3@dont-email.me> <uqu00d$1fckl$6@dont-email.me>
<uqu1pj$1frfr$4@dont-email.me> <uqui93$1mitf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 05:18:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ddd376f1c1df309f4c794f01086d8954";
logging-data="1815031"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187xFZ0OLTY7kD3VaL1Qqgj"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:Wn+ml4QQ3MhTOVuMA33NMIB6jmE=
 by: Lawrence D'Oliv - Mon, 19 Feb 2024 05:18 UTC

On Mon, 19 Feb 2024 04:34:59 +0100, Janis Papanagnou wrote:

> They completely avoided using
> the 'float' types in Nethack and did all arithmetic in integer ...

Back then, floating-point hardware cost extra, and cheaper machines
(particularly in the PC market) usually did without.

Some programs did calculations in fixed-point, to get some fractional part
without going whole hog with floats.

Re: How About Disallowing Assignments In Expressions?

<uquocu$1ncfn$8@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 05:19:26 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <uquocu$1ncfn$8@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq93m2$3g3f$2@dont-email.me>
<8734tzoli4.fsf@bsb.me.uk> <uq979e$40n1$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uqlerj$3crk6$1@dont-email.me>
<uqmd23$3hv8k$5@dont-email.me> <uqn4bd$3ovo5$1@dont-email.me>
<uqopsh$25h4$8@dont-email.me> <87y1bj7v0v.fsf@nosuchdomain.example.com>
<uqq3rt$cdvf$1@dont-email.me> <uqrqc2$n43b$6@dont-email.me>
<uqt60g$16rno$3@dont-email.me> <uqu00d$1fckl$6@dont-email.me>
<uqu1pj$1frfr$4@dont-email.me> <uqu4dg$1gg86$3@dont-email.me>
<uqudt7$1i55a$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 05:19:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ddd376f1c1df309f4c794f01086d8954";
logging-data="1815031"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oEpTzEMlRmj2BFOiBYC6E"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:aTZeuYxsm8yFY5crEyJcDwyUH9o=
 by: Lawrence D'Oliv - Mon, 19 Feb 2024 05:19 UTC

On Mon, 19 Feb 2024 02:20:22 +0000, Malcolm McLean wrote:

> On 18/02/2024 23:38, Lawrence D'Oliveiro wrote:
>
>> On Sun, 18 Feb 2024 23:53:39 +0100, David Brown wrote:
>>
>>> If you need an efficient way to calculate such hypotenuses, the
>>> function "hypot" will get you /into/ trouble.
>>
>> Tip: something that programmers *do* frequently find surprising is that
>> their intuitions over which parts of their code to optimize and which
>> ones not to are all too frequently wrong.
>>
> I rarely find that with C. Usually each statement or operator compiles
> to a single machine instruction.

It’s not the number of instructions that’s the issue, but the time taken
to execute them.

Re: How About Disallowing Assignments In Expressions?

<uquphk$1ngal$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 00:39:00 -0500
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <uquphk$1ngal$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq93m2$3g3f$2@dont-email.me>
<8734tzoli4.fsf@bsb.me.uk> <uq979e$40n1$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uqlerj$3crk6$1@dont-email.me>
<uqmd23$3hv8k$5@dont-email.me> <uqn4bd$3ovo5$1@dont-email.me>
<uqopsh$25h4$8@dont-email.me> <87y1bj7v0v.fsf@nosuchdomain.example.com>
<uqq3rt$cdvf$1@dont-email.me> <uqrqc2$n43b$6@dont-email.me>
<uqt60g$16rno$3@dont-email.me> <uqu00d$1fckl$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 05:39:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a91cd74082397a7a237132a8575fdb68";
logging-data="1818965"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Qs1we2QYg7CVl8P5jNevvShPILevMlAc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:kNIwfIL0bE/IZj3zistn+9/1Twc=
Content-Language: en-US
In-Reply-To: <uqu00d$1fckl$6@dont-email.me>
 by: James Kuyper - Mon, 19 Feb 2024 05:39 UTC

On 2/18/24 17:23, Lawrence D'Oliveiro wrote:
> On Sun, 18 Feb 2024 15:59:28 +0100, David Brown wrote:
>
>> It could well be a surprise to non-experts that there is a function
>> "hypot" in the C library, rather than just writing "sqrt(x*x + y*y)".
>
> What kind of programmer is it, that it would be so easy to surprise them
> just by pointing out something in the documentation?

A fairly normal one, in my experience. Few programmers have the standard
memorized, certainly not me. I am sufficiently familiar with it to know
where to go looking if I have a question, but even that level of
familiarity is rare. In particular, there's lots of programmers not
particularly interested in or familiar with the math library. Most of
those would consider hypot() an obscure function. I was working on a
NASA contract on scientific software when I introduced hypot() into a
function, and at least half the people who reviewed the code needed to
be reminded what it does.

Re: How About Disallowing Assignments In Expressions?

<uqv1f8$1p1ug$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: malcolm....@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 07:54:15 +0000
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <uqv1f8$1p1ug$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq4nmb$2hive$6@dont-email.me>
<87r0hlef8q.fsf@nosuchdomain.example.com> <uq6nha$2spqe$3@dont-email.me>
<87sf20o4e2.fsf@bsb.me.uk> <uq8quh$3padl$13@dont-email.me>
<uqag7k$v4d8$8@dont-email.me> <uqg4h6$25gc3$1@dont-email.me>
<uqg5mn$25m88$1@dont-email.me> <uqh12g$2akab$1@dont-email.me>
<87a5o3amit.fsf@nosuchdomain.example.com> <20240214120232.00001d56@yahoo.com>
<Bm5zN.88069$GX69.22371@fx46.iad> <871q9f9go2.fsf@nosuchdomain.example.com>
<867cj61ckn.fsf@linuxsc.com> <87bk8i8ci1.fsf@nosuchdomain.example.com>
<86plwuy6n5.fsf@linuxsc.com> <87ttm67g76.fsf@nosuchdomain.example.com>
<uqrq0g$n43b$4@dont-email.me> <uqso32$10l39$3@dont-email.me>
<uqt4c6$16af9$1@dont-email.me> <uqtv6i$1fckl$3@dont-email.me>
<uqukju$1mugr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 07:54:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="89823c65c8dcc1076b63d0371407dabc";
logging-data="1869776"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CWMxLH7iuXndS+3yIW/2SLG/uWUggLVA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:yXBocua0I2fouxjWKf53rjjQgYw=
Content-Language: en-GB
In-Reply-To: <uqukju$1mugr$1@dont-email.me>
 by: Malcolm McLean - Mon, 19 Feb 2024 07:54 UTC

On 19/02/2024 04:14, Janis Papanagnou wrote:
>
> BTW; a mistake of mine was to write inaccurately "C with the two
> parenthesis syntaxes"; it was, I think, C++ that added the second
> form that made it possible that a cast looks like a function call.
> Frankly, I don't know whether C also added that.
>
Is a constructor a cast?

We have a class called "fixed" which represents reals in binary using a
fixed binary point. So obviously we shall write a constructor for it so
we can easily and conviently obtain values like "0.5", which shall take
a double. And if we all it exlicitly it's

fixed x;

x = fixed(0.5);

and to all intents and purposes we've just cast a double to a fixed.

And in fact

x = (fixed) 0.5;

will call the same constructor.

--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: How About Disallowing Assignments In Expressions?

<uqv1nm$1ovej$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.network!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 08:58:46 +0100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uqv1nm$1ovej$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu2ia$1g7ff$1@dont-email.me>
<C1GdneKfeajoBk_4nZ2dnZfqn_adnZ2d@brightview.co.uk>
<uque87$1i55a$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 07:58:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f7bfe56a2f930bb381d80e54878b81f";
logging-data="1867219"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/n27LCacHi8sD3Pd2m6DPfweUv+KQyvqQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:HD+VeZflVMLXSSrwfr4iOB17y1w=
In-Reply-To: <uque87$1i55a$2@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 19 Feb 2024 07:58 UTC

On 19/02/2024 03:26, Malcolm McLean wrote:
> Our maths teacher was Selby Brock (a
> brilliant man who taught that the earth was flat),

Isn't that somewhat of an oxymoron? I had one primary teacher that
taught that there were 10 planets (Pluto was still called a planet at
the time, and he counted the sun as a planet) and another that did not
consider the sun to be a star or the earth to be a planet. But these
were /not/ good teachers.

It's conceivable that this person was a good teacher of maths, but
that's different from being a good teacher in general.

Re: How About Disallowing Assignments In Expressions?

<uqv1rq$1ovej$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 09:00:58 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <uqv1rq$1ovej$2@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu2ia$1g7ff$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 08:00:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f7bfe56a2f930bb381d80e54878b81f";
logging-data="1867219"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7uNa39O6nenMPKPVUAr+nywYyFDLe52k="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:0ZHi8uv/r8zp19CPO4h4MljMZqY=
In-Reply-To: <uqu2ia$1g7ff$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 19 Feb 2024 08:00 UTC

On 19/02/2024 00:06, Richard Harnden wrote:
> On 18/02/2024 22:34, Ben Bacarisse wrote:
>
> [BODMAS]
>
>>
>> I've always seen it rendered as "orders".  I think "indexes" is better,
>> but it does not fix the basic problem.
>>
>> And, for the record, I was never taught it.
>>
>
> Just curious - Were you taught SOHCAHTOA for trig?  I always found that
> easy to remember.
>

I remember one teacher using that phrase. I didn't see the point, but I
was already quite happy with basic trig by then.

Re: How About Disallowing Assignments In Expressions?

<uqv3gv$1pd4r$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!newsfeed.xs3.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 09:29:19 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <uqv3gv$1pd4r$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu4la$1gg86$5@dont-email.me>
<87zfvxfbe4.fsf@bsb.me.uk> <uquo8c$1ncfn$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 08:29:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f7bfe56a2f930bb381d80e54878b81f";
logging-data="1881243"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19aoRYGRgzeZcMyJqzPoSgXZdFWu/zMiYg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:S4KVMooYaVUz4NAv4iBjR+z0B5c=
Content-Language: en-GB
In-Reply-To: <uquo8c$1ncfn$6@dont-email.me>
 by: David Brown - Mon, 19 Feb 2024 08:29 UTC

On 19/02/2024 06:17, Lawrence D'Oliveiro wrote:
> On Mon, 19 Feb 2024 02:14:43 +0000, Ben Bacarisse wrote:
>
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>>> On Sun, 18 Feb 2024 22:34:06 +0000, Ben Bacarisse wrote:
>>>
>>>> ... brackets, orders ...
>>>
>>> “Of” (implied multiplication), not “orders”.
>>
>> You may have been taught that (why?) but an online search suggests that
>> that is not what gets taught.
>
> I’m not sure why. Given that exponentiation is conventionally denoted by
> placement, e.g.
>
> b + c
> a
>
> there cannot possibly be any ambiguity about how the binding is supposed
> to work.

I think you underestimate the ability of schoolkids to get things wrong!
ab² could easily be misinterpreted as (ab)².

Re: How About Disallowing Assignments In Expressions?

<uqv3u4$1pd4r$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.network!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 09:36:20 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <uqv3u4$1pd4r$2@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq93m2$3g3f$2@dont-email.me>
<8734tzoli4.fsf@bsb.me.uk> <uq979e$40n1$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uqlerj$3crk6$1@dont-email.me>
<uqmd23$3hv8k$5@dont-email.me> <uqn4bd$3ovo5$1@dont-email.me>
<uqopsh$25h4$8@dont-email.me> <87y1bj7v0v.fsf@nosuchdomain.example.com>
<uqq3rt$cdvf$1@dont-email.me> <uqrqc2$n43b$6@dont-email.me>
<uqt60g$16rno$3@dont-email.me> <uqu00d$1fckl$6@dont-email.me>
<uqu1pj$1frfr$4@dont-email.me> <uqu4dg$1gg86$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 08:36:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f7bfe56a2f930bb381d80e54878b81f";
logging-data="1881243"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XoJk5hLdRMQ33p3dsD96RO9S8d9/iQak="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:rMRvg/pPdjbXEXWN2jua9q6ZIRA=
In-Reply-To: <uqu4dg$1gg86$3@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 19 Feb 2024 08:36 UTC

On 19/02/2024 00:38, Lawrence D'Oliveiro wrote:
> On Sun, 18 Feb 2024 23:53:39 +0100, David Brown wrote:
>
>> If you need an efficient way to calculate such hypotenuses, the function
>> "hypot" will get you /into/ trouble.
>
> Tip: something that programmers *do* frequently find surprising is that
> their intuitions over which parts of their code to optimize and which ones
> not to are all too frequently wrong.

That is absolutely true.

And they also regularly misunderstand what actually affects the speed of
their code. This is particularly true for "big" systems, where a single
cache miss can make as much difference as many dozens of instructions,
and where pipelining, scheduling and out-of-order execution makes it
very difficult to figure out the real bottlenecks.

Re: How About Disallowing Assignments In Expressions?

<uqv4p9$1pd4r$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 09:50:49 +0100
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <uqv4p9$1pd4r$3@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq86e9$37s7s$1@dont-email.me>
<uq93m2$3g3f$2@dont-email.me> <8734tzoli4.fsf@bsb.me.uk>
<uq979e$40n1$1@dont-email.me> <87v86vbx6s.fsf@nosuchdomain.example.com>
<uq98lm$40n1$6@dont-email.me> <87il2vbvza.fsf@nosuchdomain.example.com>
<uqau5o$11nm8$1@dont-email.me> <uqauo4$11vps$1@dont-email.me>
<uqbrjo$16jcf$6@dont-email.me> <uqg3m0$258lu$5@dont-email.me>
<uqgpd1$29928$3@dont-email.me> <87il2s9fdj.fsf@nosuchdomain.example.com>
<uqj95e$2qhb1$1@dont-email.me> <sEazN.324764$Wp_8.34532@fx17.iad>
<uqkjp1$379pl$11@dont-email.me> <uqlf6g$3crk6$2@dont-email.me>
<uqmd5s$3hv8k$6@dont-email.me> <20240215182114.463@kylheku.com>
<uqn4l7$3ovo5$2@dont-email.me> <uqoq24$25h4$11@dont-email.me>
<uqq498$cdvf$3@dont-email.me> <uqrqta$n43b$9@dont-email.me>
<uqt6sf$17rsg$1@dont-email.me> <uqu4g4$1gg86$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 08:50:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f7bfe56a2f930bb381d80e54878b81f";
logging-data="1881243"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18bccKODrBpBuD79GyK2SoYRE57oibpbw4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:cgucIjt2RySxurUVq54uSIhMKsE=
Content-Language: en-GB
In-Reply-To: <uqu4g4$1gg86$4@dont-email.me>
 by: David Brown - Mon, 19 Feb 2024 08:50 UTC

On 19/02/2024 00:39, Lawrence D'Oliveiro wrote:
> On Sun, 18 Feb 2024 16:14:23 +0100, David Brown wrote:
>
>> My claim is that no one would feel the need to add "/*if*/" comments to
>> closing brackets unless they felt the code was not clearly
>> comprehensible without such comments. I am saying that /you/ write
>> /your/ code as though /you/ think your own code is hard to comprehend.
>
> No, you originally said “... if you need to do that with your "if"
> statements, your style is an incomprehensible mess”. So the
> “incomprehensible mess” nonsense is *your* claim, not mine, and *you* are
> the one who needs to back it up, not me.

I have explained what I meant, and given my reasoning. If you don't
understand that, or don't like it, feel free to ignore it.

(Note that I did not say your style is an incomprehensible mess. I said
/if/ you need these comments, it is a mess. But I don't know if you
feel you /need/ these comments, or if you generally use them - I would
assume the post with the "histogram" function was not a realistic
example of your normal coding style.)

Re: How About Disallowing Assignments In Expressions?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.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: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 10:15:26 +0000
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <87o7ccg3pd.fsf@bsb.me.uk>
References: <uq3s76$28dsr$1@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com>
<uqau5o$11nm8$1@dont-email.me> <uqauo4$11vps$1@dont-email.me>
<uqbrjo$16jcf$6@dont-email.me> <uqg3m0$258lu$5@dont-email.me>
<uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com>
<uqj95e$2qhb1$1@dont-email.me> <sEazN.324764$Wp_8.34532@fx17.iad>
<uqkjp1$379pl$11@dont-email.me> <uqlf6g$3crk6$2@dont-email.me>
<uqmd5s$3hv8k$6@dont-email.me> <uqnbq1$3q345$1@dont-email.me>
<uqoq1n$25h4$10@dont-email.me> <uqos0a$2oqu$2@dont-email.me>
<uqrqr0$n43b$8@dont-email.me> <20240218110946.00007b8d@yahoo.com>
<uqss17$11b8g$3@dont-email.me> <87zfvxiiqi.fsf@bsb.me.uk>
<uqujqk$1mqnv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="35307a75fbd0b3137ff8d97b5fa03eb1";
logging-data="1917829"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186ItocDWLvTj15/suZdnhewHg4cDWu444="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:DCEQyeY8zvX3NcfML+OeS8RmKkg=
sha1:cF5XrfnYteTgL/LZPhZQ+IFzfuY=
X-BSB-Auth: 1.dde22f6d2fe250238ea5.20240219101526GMT.87o7ccg3pd.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 19 Feb 2024 10:15 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:

> On 18.02.2024 22:07, Ben Bacarisse wrote:
>>
>> The replies to your tendentious advice seem to be vying for maximum
>> obfuscation. This should not written as a 'for' loop at all; it's a
>> natural 'while' loop:
>
> Yes, but the original post contained an specific for() based example
> and the topic was about local declaration not about the best control
> construct.

Oh. It seemed like you were suggesting an improvement to the posted
code.

--
Ben.

Re: How About Disallowing Assignments In Expressions?

<uqvo4k$1tfor$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: malcolm....@gmail.com (Malcolm McLean)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 14:21:08 +0000
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uqvo4k$1tfor$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu2ia$1g7ff$1@dont-email.me>
<C1GdneKfeajoBk_4nZ2dnZfqn_adnZ2d@brightview.co.uk>
<uque87$1i55a$2@dont-email.me> <uqv1nm$1ovej$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 14:21:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="89823c65c8dcc1076b63d0371407dabc";
logging-data="2015003"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XrnaCwJXZR1anFM99WOX/QlmpwnLcfUM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EauwCTqRFQTLH50ctOaI3Ig46Y4=
In-Reply-To: <uqv1nm$1ovej$1@dont-email.me>
Content-Language: en-GB
 by: Malcolm McLean - Mon, 19 Feb 2024 14:21 UTC

On 19/02/2024 07:58, David Brown wrote:
> On 19/02/2024 03:26, Malcolm McLean wrote:
>> Our maths teacher was Selby Brock (a brilliant man who taught that the
>> earth was flat),
>
> Isn't that somewhat of an oxymoron?  I had one primary teacher that
> taught that there were 10 planets (Pluto was still called a planet at
> the time, and he counted the sun as a planet) and another that did not
> consider the sun to be a star or the earth to be a planet.  But these
> were /not/ good teachers.
>
> It's conceivable that this person was a good teacher of maths, but
> that's different from being a good teacher in general.
>
Come on. Some respect and some intelligence. If I say he was a brilliant
man I wouldn't say that lightly, and he had very good reasons for
teaching that the Earth was flat. It was nonsense, everyone knew it was
nonsense, but no boy ever actually managed to prove that it was
nonsense, and that was the point.

But it perfectly justified "Selby always teaches crap".

--
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

Re: How About Disallowing Assignments In Expressions?

<sgKAN.487273$83n7.355646@fx18.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: How About Disallowing Assignments In Expressions?
Newsgroups: comp.lang.c
References: <uq3s76$28dsr$1@dont-email.me> <86wmr6z0zg.fsf@linuxsc.com> <uql32m$3apfo$1@dont-email.me> <uqlerj$3crk6$1@dont-email.me> <uqmd23$3hv8k$5@dont-email.me> <uqn4bd$3ovo5$1@dont-email.me> <uqopsh$25h4$8@dont-email.me> <87y1bj7v0v.fsf@nosuchdomain.example.com> <uqq3rt$cdvf$1@dont-email.me> <uqrqc2$n43b$6@dont-email.me> <uqt60g$16rno$3@dont-email.me> <uqu00d$1fckl$6@dont-email.me> <uqu1pj$1frfr$4@dont-email.me> <uqu4dg$1gg86$3@dont-email.me> <uqudt7$1i55a$1@dont-email.me>
Lines: 19
Message-ID: <sgKAN.487273$83n7.355646@fx18.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 19 Feb 2024 15:15:36 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 19 Feb 2024 15:15:36 GMT
X-Received-Bytes: 1930
 by: Scott Lurndal - Mon, 19 Feb 2024 15:15 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>On 18/02/2024 23:38, Lawrence D'Oliveiro wrote:
>> On Sun, 18 Feb 2024 23:53:39 +0100, David Brown wrote:
>>
>>> If you need an efficient way to calculate such hypotenuses, the function
>>> "hypot" will get you /into/ trouble.
>>
>> Tip: something that programmers *do* frequently find surprising is that
>> their intuitions over which parts of their code to optimize and which ones
>> not to are all too frequently wrong.
> >
>I rarely find that with C. Usually each statement or operator compiles
>to a single machine instruction.

You must not look at the output of compiled C very often if
those are your observations. Setting up the arguments for
a function call, for example. Switch statements. Loops.

Try 'objdump -dS' sometime.

Re: How About Disallowing Assignments In Expressions?

<uqvrg7$1u9qq$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 16:18:30 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <uqvrg7$1u9qq$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu4la$1gg86$5@dont-email.me>
<87zfvxfbe4.fsf@bsb.me.uk> <uquo8c$1ncfn$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 15:18:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d2f9f628ceccec27a59ad9e50a409961";
logging-data="2041690"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181+/DKUSHH2qkopMlP+BqE"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Wi2dvNboS3fUWUG2urX79J+Nvu0=
In-Reply-To: <uquo8c$1ncfn$6@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Mon, 19 Feb 2024 15:18 UTC

On 19.02.2024 06:17, Lawrence D'Oliveiro wrote:
>
> I’m not sure why. Given that exponentiation is conventionally denoted by
> placement, e.g.
>
> b + c
> a
>
> there cannot possibly be any ambiguity about how the binding is supposed
> to work.

It is relevant, e.g. in 4^3^2 which is 4^(3^2) and not (4^3)^2
(when "placement" is the representation in writings), and in computer
formulas it's anyway relevant when everything is on one line.

Janis

[OT] was Re: How About Disallowing Assignments In Expressions?

<uqvrjm$1u9qq$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!newsfeed.xs3.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: [OT] was Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 16:20:22 +0100
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <uqvrjm$1u9qq$2@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu2ia$1g7ff$1@dont-email.me>
<C1GdneKfeajoBk_4nZ2dnZfqn_adnZ2d@brightview.co.uk>
<uque87$1i55a$2@dont-email.me> <uqv1nm$1ovej$1@dont-email.me>
<uqvo4k$1tfor$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 15:20:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d2f9f628ceccec27a59ad9e50a409961";
logging-data="2041690"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JUEvQ2SK2dfdOy4ZMXg24"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:9Aa7hrFTb8ffvOXVSyFamX+LvG4=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <uqvo4k$1tfor$1@dont-email.me>
 by: Janis Papanagnou - Mon, 19 Feb 2024 15:20 UTC

On 19.02.2024 15:21, Malcolm McLean wrote:
> On 19/02/2024 07:58, David Brown wrote:
>> On 19/02/2024 03:26, Malcolm McLean wrote:
>>> Our maths teacher was Selby Brock (a brilliant man who taught that
>>> the earth was flat),

Confirmed by Terry Pratchett. (How else could earth reside stable
on top of these elephants.) Or was that yet another [flat] planet?

>> Isn't that somewhat of an oxymoron? I had one primary teacher that
>> taught that there were 10 planets (Pluto was still called a planet at
>> the time,

Well, at that time there was at least a hypothesis about a tenth
planet, they named it "Transpluto".

>> and he counted the sun as a planet) and another that did not
>> consider the sun to be a star or the earth to be a planet. But these
>> were /not/ good teachers.
>>
>> It's conceivable that this person was a good teacher of maths, but
>> that's different from being a good teacher in general.
>>
> Come on. Some respect and some intelligence. If I say he was a brilliant
> man I wouldn't say that lightly, and he had very good reasons for
> teaching that the Earth was flat.

What were these "very good reasons"? (Maybe personal, maybe religious
reasons, but obviously not good reasons as far as science and reality
is concerned.)

> It was nonsense, everyone knew it was
> nonsense, but no boy ever actually managed to prove that it was
> nonsense, and that was the point.

Frankly, I'm reluctant to stir this up. But I assume by "no boy"
you mean the boys that were in this school?

Long ago, since more than 2200(!) years it had already been proven
that the earth is spherical, and even its diameter was calculated
with good accuracy. This was long before mankind went into earth
orbit to even directly observe the earth as sphere.

>
> But it perfectly justified "Selby always teaches crap".

Janis

Re: How About Disallowing Assignments In Expressions?

<uqvs2t$1uc8g$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 16:28:29 +0100
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <uqvs2t$1uc8g$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu2ia$1g7ff$1@dont-email.me>
<C1GdneKfeajoBk_4nZ2dnZfqn_adnZ2d@brightview.co.uk>
<uque87$1i55a$2@dont-email.me> <uqv1nm$1ovej$1@dont-email.me>
<uqvo4k$1tfor$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 15:28:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f7bfe56a2f930bb381d80e54878b81f";
logging-data="2044176"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/n99I0Fh+Yzqisitr+bRU6mXIgues8p+o="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:6FS5G/rqQgQMJu35eP4Ew0BsdyE=
In-Reply-To: <uqvo4k$1tfor$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 19 Feb 2024 15:28 UTC

On 19/02/2024 15:21, Malcolm McLean wrote:
> On 19/02/2024 07:58, David Brown wrote:
>> On 19/02/2024 03:26, Malcolm McLean wrote:
>>> Our maths teacher was Selby Brock (a brilliant man who taught that
>>> the earth was flat),
>>
>> Isn't that somewhat of an oxymoron?  I had one primary teacher that
>> taught that there were 10 planets (Pluto was still called a planet at
>> the time, and he counted the sun as a planet) and another that did not
>> consider the sun to be a star or the earth to be a planet.  But these
>> were /not/ good teachers.
>>
>> It's conceivable that this person was a good teacher of maths, but
>> that's different from being a good teacher in general.
>>
> Come on. Some respect and some intelligence. If I say he was a brilliant
> man I wouldn't say that lightly, and he had very good reasons for
> teaching that the Earth was flat. It was nonsense, everyone knew it was
> nonsense, but no boy ever actually managed to prove that it was
> nonsense, and that was the point.

It's fine to challenge pupils to prove that the earth is not flat, and
to force them to think about things that they take for granted. But
that's not what you said he did.

There are teachers who hold all kinds of weird and nonsensical beliefs,
just as in many other areas of life. People can believe what they want
- freedom of religion is important. But what they /teach/, or how they
otherwise interact with people that they have power or authority over,
is a different matter.

There are surely good teachers out there that believe the earth is flat.
But if they teach it, they are not good teachers - and that's what you
said this guy did.

And if he is just trying to challenge the kids to justify their
conviction that the earth is not flat, and he left them unable to prove
their claims, then he is still bad. Now the kids are left confused -
they don't know whether they are wrong to think the earth is round, or
whether it is something that everyone believes without proof and that
it's okay to believe things because simply because lots of other people
believe them.

>
> But it perfectly justified "Selby always teaches crap".
>

For the sake of that guy's reputation, I'll assume you are right that he
was a good teacher - but it is not what you said.

Re: [OT] was Re: How About Disallowing Assignments In Expressions?

<uqvtg6$1uo1n$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: [OT] was Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 16:52:37 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <uqvtg6$1uo1n$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu2ia$1g7ff$1@dont-email.me>
<C1GdneKfeajoBk_4nZ2dnZfqn_adnZ2d@brightview.co.uk>
<uque87$1i55a$2@dont-email.me> <uqv1nm$1ovej$1@dont-email.me>
<uqvo4k$1tfor$1@dont-email.me> <uqvrjm$1u9qq$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 15:52:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f7bfe56a2f930bb381d80e54878b81f";
logging-data="2056247"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GY4JDUX5aF8BCzIHChKjqgyr+J3gq+qU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:/wNXgRJl1bk8oIsCyT/Weo14q+4=
Content-Language: en-GB
In-Reply-To: <uqvrjm$1u9qq$2@dont-email.me>
 by: David Brown - Mon, 19 Feb 2024 15:52 UTC

On 19/02/2024 16:20, Janis Papanagnou wrote:
>
> Long ago, since more than 2200(!) years it had already been proven
> that the earth is spherical, and even its diameter was calculated
> with good accuracy. This was long before mankind went into earth
> orbit to even directly observe the earth as sphere.
>

That early calculation of the earth's diameter was accurate by sheer
luck - Eratosthenes made a variety of errors that each lead to huge
inaccuracies in the calculations, but by chance happened to cancel each
other out. He gets full credit for his methods, however. Later
astronomers, especially in the Islamic world, measured it more
accurately. And the main point - that the earth is basically round, not
flat - was proven and known to the classical Greeks and others.

Re: How About Disallowing Assignments In Expressions?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 08:04:30 -0800
Organization: None to speak of
Lines: 22
Message-ID: <87jzn05tkh.fsf@nosuchdomain.example.com>
References: <uq3s76$28dsr$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com>
<uqj95e$2qhb1$1@dont-email.me> <sEazN.324764$Wp_8.34532@fx17.iad>
<86wmr6z0zg.fsf@linuxsc.com> <uql32m$3apfo$1@dont-email.me>
<uql4lr$3avsv$1@dont-email.me> <uqr2cn$ilis$1@dont-email.me>
<uqr5t0$jcff$1@dont-email.me> <uqrlpo$mhj5$1@dont-email.me>
<uqrqml$n43b$7@dont-email.me> <uqt57b$16rno$1@dont-email.me>
<uqth9q$1cn02$1@dont-email.me> <87ttm5ieqp.fsf@bsb.me.uk>
<uqu2ia$1g7ff$1@dont-email.me>
<C1GdneKfeajoBk_4nZ2dnZfqn_adnZ2d@brightview.co.uk>
<uque87$1i55a$2@dont-email.me> <uqv1nm$1ovej$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="3063e15dd79afee7d5be32a08e65d14a";
logging-data="2058711"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19KS1CUTUKL0FGRJ8bzV/Jj"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:TAiGq0iL1c6+XR0AfreVjRBAxvk=
sha1:myFcsnfKlXocEtbuzSjmk5frWf0=
 by: Keith Thompson - Mon, 19 Feb 2024 16:04 UTC

David Brown <david.brown@hesbynett.no> writes:
> On 19/02/2024 03:26, Malcolm McLean wrote:
>> Our maths teacher was Selby Brock (a brilliant man who taught that
>> the earth was flat),
>
> Isn't that somewhat of an oxymoron? I had one primary teacher that
> taught that there were 10 planets (Pluto was still called a planet at
> the time, and he counted the sun as a planet) and another that did not
> consider the sun to be a star or the earth to be a planet. But these
> were /not/ good teachers.
>
> It's conceivable that this person was a good teacher of maths, but
> that's different from being a good teacher in general.

David, this is why this newsgroup has such a poor signal-to-noise ratio.

You don't have to reply to everything.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: How About Disallowing Assignments In Expressions?

<ur00pb$1vfno$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 17:48:43 +0100
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <ur00pb$1vfno$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me> <uq4nmb$2hive$6@dont-email.me>
<87r0hlef8q.fsf@nosuchdomain.example.com> <uq6nha$2spqe$3@dont-email.me>
<87sf20o4e2.fsf@bsb.me.uk> <uq8quh$3padl$13@dont-email.me>
<uqag7k$v4d8$8@dont-email.me> <uqg4h6$25gc3$1@dont-email.me>
<uqg5mn$25m88$1@dont-email.me> <uqh12g$2akab$1@dont-email.me>
<87a5o3amit.fsf@nosuchdomain.example.com> <20240214120232.00001d56@yahoo.com>
<Bm5zN.88069$GX69.22371@fx46.iad> <871q9f9go2.fsf@nosuchdomain.example.com>
<867cj61ckn.fsf@linuxsc.com> <87bk8i8ci1.fsf@nosuchdomain.example.com>
<86plwuy6n5.fsf@linuxsc.com> <87ttm67g76.fsf@nosuchdomain.example.com>
<uqrq0g$n43b$4@dont-email.me> <uqso32$10l39$3@dont-email.me>
<uqt4c6$16af9$1@dont-email.me> <uqtv6i$1fckl$3@dont-email.me>
<uqukju$1mugr$1@dont-email.me> <uqv1f8$1p1ug$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 16:48:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d2f9f628ceccec27a59ad9e50a409961";
logging-data="2080504"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KRsSwEn8TpRsgENl2/dCg"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:S1urRHZStIoPx44XY1CVwMQjBBg=
In-Reply-To: <uqv1f8$1p1ug$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Mon, 19 Feb 2024 16:48 UTC

On 19.02.2024 08:54, Malcolm McLean wrote:
> On 19/02/2024 04:14, Janis Papanagnou wrote:
>>
>> BTW; a mistake of mine was to write inaccurately "C with the two
>> parenthesis syntaxes"; it was, I think, C++ that added the second
>> form that made it possible that a cast looks like a function call.
>> Frankly, I don't know whether C also added that.
>>
> Is a constructor a cast?

That was something I pondered about when I programmed C++ in the 1990's.

But above, it was not (not primarily) meant when using own classes, but
with bascis types; as in (int)x vs. int(x) .

My question was about newer C standards supporting the second form;
a quick test shows that C++ (of course) does, but my C version doesn't.
But I (still) don't know about the current C standards.

>
> We have a class called "fixed" which represents reals in binary using a
> fixed binary point. So obviously we shall write a constructor for it so
> we can easily and conviently obtain values like "0.5", which shall take
> a double. And if we all it exlicitly it's
>
> fixed x;
>
> x = fixed(0.5);
>
> and to all intents and purposes we've just cast a double to a fixed.
>
> And in fact
>
> x = (fixed) 0.5;
>
> will call the same constructor.

Sure.

(But wouldn't x = 0.5; have also used your constructor, unless
explicitly prohibited by its definition?)

Janis

Re: How About Disallowing Assignments In Expressions?

<ur015q$1vj2r$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 17:55:22 +0100
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <ur015q$1vj2r$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu4la$1gg86$5@dont-email.me>
<87zfvxfbe4.fsf@bsb.me.uk> <uquo8c$1ncfn$6@dont-email.me>
<uqvrg7$1u9qq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Feb 2024 16:55:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d2f9f628ceccec27a59ad9e50a409961";
logging-data="2083931"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CcM/2ReezdFWWSXmkGFqO"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:KBUN69txZ3YH0B/kNS5skLX7WaY=
In-Reply-To: <uqvrg7$1u9qq$1@dont-email.me>
 by: Janis Papanagnou - Mon, 19 Feb 2024 16:55 UTC

On 19.02.2024 16:18, Janis Papanagnou wrote:
> On 19.02.2024 06:17, Lawrence D'Oliveiro wrote:
>>
>> I’m not sure why. Given that exponentiation is conventionally denoted by
>> placement, e.g.
>>
>> b + c
>> a
>>
>> there cannot possibly be any ambiguity about how the binding is supposed
>> to work.
>
> It is relevant, e.g. in 4^3^2 which is 4^(3^2) and not (4^3)^2

I just noticed that my newsreader (and probably also other newsreaders)
replaced the expression partially and might obfuscate the point I made.

The expressions were: 4 caret 4 caret 2
and: 4 caret ( 4 caret 2 )
and: ( 4 caret 4 ) caret 2

where "caret" is meant to be the exponentiation operator.

> (when "placement" is the representation in writings), and in computer
> formulas it's anyway relevant when everything is on one line.
>
> Janis
>

Re: How About Disallowing Assignments In Expressions?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 08:58:50 -0800
Organization: None to speak of
Lines: 30
Message-ID: <87frxo5r1x.fsf@nosuchdomain.example.com>
References: <uq3s76$28dsr$1@dont-email.me> <uq8quh$3padl$13@dont-email.me>
<uqag7k$v4d8$8@dont-email.me> <uqg4h6$25gc3$1@dont-email.me>
<uqg5mn$25m88$1@dont-email.me> <uqh12g$2akab$1@dont-email.me>
<87a5o3amit.fsf@nosuchdomain.example.com>
<20240214120232.00001d56@yahoo.com> <Bm5zN.88069$GX69.22371@fx46.iad>
<871q9f9go2.fsf@nosuchdomain.example.com> <867cj61ckn.fsf@linuxsc.com>
<87bk8i8ci1.fsf@nosuchdomain.example.com> <86plwuy6n5.fsf@linuxsc.com>
<87ttm67g76.fsf@nosuchdomain.example.com>
<uqrq0g$n43b$4@dont-email.me> <uqso32$10l39$3@dont-email.me>
<uqt4c6$16af9$1@dont-email.me> <uqtv6i$1fckl$3@dont-email.me>
<uqukju$1mugr$1@dont-email.me> <uqv1f8$1p1ug$1@dont-email.me>
<ur00pb$1vfno$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="3063e15dd79afee7d5be32a08e65d14a";
logging-data="2080005"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XeHZUwACRyrvOecvEzSwJ"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:B69hTybtApGTTyJ2lhaoBr90qPM=
sha1:s5JLRLzYi/1YK2egC5h605fcY3I=
 by: Keith Thompson - Mon, 19 Feb 2024 16:58 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> On 19.02.2024 08:54, Malcolm McLean wrote:
>> On 19/02/2024 04:14, Janis Papanagnou wrote:
>>>
>>> BTW; a mistake of mine was to write inaccurately "C with the two
>>> parenthesis syntaxes"; it was, I think, C++ that added the second
>>> form that made it possible that a cast looks like a function call.
>>> Frankly, I don't know whether C also added that.
>>>
>> Is a constructor a cast?
>
> That was something I pondered about when I programmed C++ in the 1990's.
>
> But above, it was not (not primarily) meant when using own classes, but
> with bascis types; as in (int)x vs. int(x) .
>
> My question was about newer C standards supporting the second form;
> a quick test shows that C++ (of course) does, but my C version doesn't.
> But I (still) don't know about the current C standards.

C does not support C++-style int(x) casts in any version up to and
including C23. The only form of cast in C is (type-name) expression.
(Implicit conversions are not casts.)

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: [OT] was Re: How About Disallowing Assignments In Expressions?

<ur01nj$1vmpt$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: [OT] was Re: How About Disallowing Assignments In Expressions?
Date: Mon, 19 Feb 2024 18:04:50 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <ur01nj$1vmpt$1@dont-email.me>
References: <uq3s76$28dsr$1@dont-email.me>
<87v86vbx6s.fsf@nosuchdomain.example.com> <uq98lm$40n1$6@dont-email.me>
<87il2vbvza.fsf@nosuchdomain.example.com> <uqau5o$11nm8$1@dont-email.me>
<uqauo4$11vps$1@dont-email.me> <uqbrjo$16jcf$6@dont-email.me>
<uqg3m0$258lu$5@dont-email.me> <uqgpd1$29928$3@dont-email.me>
<87il2s9fdj.fsf@nosuchdomain.example.com> <uqj95e$2qhb1$1@dont-email.me>
<sEazN.324764$Wp_8.34532@fx17.iad> <86wmr6z0zg.fsf@linuxsc.com>
<uql32m$3apfo$1@dont-email.me> <uql4lr$3avsv$1@dont-email.me>
<uqr2cn$ilis$1@dont-email.me> <uqr5t0$jcff$1@dont-email.me>
<uqrlpo$mhj5$1@dont-email.me> <uqrqml$n43b$7@dont-email.me>
<uqt57b$16rno$1@dont-email.me> <uqth9q$1cn02$1@dont-email.me>
<87ttm5ieqp.fsf@bsb.me.uk> <uqu2ia$1g7ff$1@dont-email.me>
<C1GdneKfeajoBk_4nZ2dnZfqn_adnZ2d@brightview.co.uk>
<uque87$1i55a$2@dont-email.me> <uqv1nm$1ovej$1@dont-email.me>
<uqvo4k$1tfor$1@dont-email.me> <uqvrjm$1u9qq$2@dont-email.me>
<uqvtg6$1uo1n$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2024 17:04:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8fb0ced11d2510ef96182587e7233275";
logging-data="2087741"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1qHFwZGRc+ArMJteAyu7Q"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:OoV6OrzoAGjNQoXdt5UGdpu/FfI=
In-Reply-To: <uqvtg6$1uo1n$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Mon, 19 Feb 2024 17:04 UTC

On 19.02.2024 16:52, David Brown wrote:
> On 19/02/2024 16:20, Janis Papanagnou wrote:
>>
>> Long ago, since more than 2200(!) years it had already been proven
>> that the earth is spherical, and even its diameter was calculated
>> with good accuracy. This was long before mankind went into earth
>> orbit to even directly observe the earth as sphere.
>>
>
> That early calculation of the earth's diameter was accurate by sheer
> luck - Eratosthenes made a variety of errors that each lead to huge
> inaccuracies in the calculations, but by chance happened to cancel each
> other out. He gets full credit for his methods, however. Later
> astronomers, especially in the Islamic world, measured it more
> accurately. And the main point - that the earth is basically round, not
> flat - was proven and known to the classical Greeks and others.

(By "sheer luck" - well, okay. Not worth a dispute for me.)

Note also that there was another one (before Eratosthenes with
his experiment) who concluded a spherical earth by other means.
(I just recently heard/read about it but unfortunately forgot
the details.) So it was, anyway, long well known knowledge, and
it's amazing if some folks still deny that.

Janis


devel / comp.lang.c / Re: How About Disallowing Assignments In Expressions?

Pages:123456789101112131415161718192021
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor