Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

A formal parsing algorithm should not always be used. -- D. Gries


devel / comp.unix.shell / Re: Command Languages Versus Programming Languages

SubjectAuthor
* Command Languages Versus Programming LanguagesLawrence D'Oliveiro
+- Re: Command Languages Versus Programming Languagescandycanearter07
+* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|+* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
||`* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| +* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| |`* Re: Command Languages Versus Programming LanguagesKeith Thompson
|| | `- Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| +* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
|| |+* Re: Command Languages Versus Programming LanguagesKeith Thompson
|| ||`* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
|| || +- Re: Command Languages Versus Programming LanguagesKeith Thompson
|| || `- Re: Command Languages Versus Programming LanguagesScott Lurndal
|| |`* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| | `- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
|| +* Re: Command Languages Versus Programming LanguagesKeith Thompson
|| |`* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|| | `- Re: Command Languages Versus Programming LanguagesKeith Thompson
|| `- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
|`* Re: Command Languages Versus Programming LanguagesStefan Ram
| `* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
|  `- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
+* Re: Command Languages Versus Programming LanguagesMuttley
|+- Re: Command Languages Versus Programming LanguagesJosef Möllers
|+* Re: Command Languages Versus Programming LanguagesRichard Kettlewell
||`* Re: Command Languages Versus Programming LanguagesMuttley
|| `* Re: Command Languages Versus Programming LanguagesKaz Kylheku
||  `* Re: Command Languages Versus Programming LanguagesMuttley
||   `* Re: Command Languages Versus Programming LanguagesKaz Kylheku
||    `* Re: Command Languages Versus Programming LanguagesMuttley
||     +- Re: Command Languages Versus Programming LanguagesJanis Papanagnou
||     +* Re: Command Languages Versus Programming LanguagesKaz Kylheku
||     |`- Re: Command Languages Versus Programming LanguagesMuttley
||     `- Re: Command Languages Versus Programming LanguagesScott Lurndal
|`* Re: Command Languages Versus Programming LanguagesJohn Ames
| +* Re: Command Languages Versus Programming LanguagesMuttley
| |+- Re: Command Languages Versus Programming LanguagesJohn Ames
| |+* Re: Command Languages Versus Programming LanguagesKaz Kylheku
| ||`* Re: Command Languages Versus Programming LanguagesMuttley
| || +* Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |+* Re: Command Languages Versus Programming LanguagesDavid W. Hodgins
| || ||+* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |||`- Re: Command Languages Versus Programming LanguagesDavid W. Hodgins
| || ||`- Re: Command Languages Versus Programming LanguagesJanis Papanagnou
| || |`* Re: Command Languages Versus Programming LanguagesMuttley
| || | `* Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |  `* Re: Command Languages Versus Programming LanguagesMuttley
| || |   +* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |   |`* Re: Command Languages Versus Programming LanguagesMuttley
| || |   | +- Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   | `* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |   |  +* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |  |+* Re: Command Languages Versus Programming LanguagesKeith Thompson
| || |   |  ||`- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |  |+* Re: Command Languages Versus Programming LanguagesJames Kuyper
| || |   |  ||`- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |  |`* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |   |  | +* Re: Command Languages Versus Programming LanguagesKenny McCormack
| || |   |  | |`* Re: Command Languages Versus Programming LanguagesScott Lurndal
| || |   |  | | +- Re: Command Languages Versus Programming LanguagesDmitry A. Kazakov
| || |   |  | | +* Too much? (Was: Command Languages Versus Programming Languages)Kenny McCormack
| || |   |  | | |+* Re: Too much? (Was: Command Languages Versus Programming Languages)Kaz Kylheku
| || |   |  | | ||`- Re: Too much? (Was: Command Languages Versus Programming Languages)Kenny McCormack
| || |   |  | | |`* Re: Too much? (Was: Command Languages Versus Programming Languages)David Brown
| || |   |  | | | +* Re: Too much? (Was: Command Languages Versus Programming Languages)James Kuyper
| || |   |  | | | |`- Football (Was: Too much? (Was: Command Languages Versus Programming Languages))Kenny McCormack
| || |   |  | | | `* Re: Too much? (Was: Command Languages Versus Programming Languages)Chris Elvidge
| || |   |  | | |  +- Re: Too much? (Was: Command Languages Versus Programming Languages)Muttley
| || |   |  | | |  +- Re: Too much? (Was: Command Languages Versus Programming Languages)David Brown
| || |   |  | | |  `- Re: Too much? (Was: Command Languages Versus Programming Languages)Mister Johnson
| || |   |  | | `- Re: Command Languages Versus Programming LanguagesJames Kuyper
| || |   |  | `* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |  |  `- Re: Command Languages Versus Programming LanguagesJohanne Fairchild
| || |   |  `* Re: Command Languages Versus Programming LanguagesStefan Ram
| || |   |   +* Re: Command Languages Versus Programming LanguagesStefan Ram
| || |   |   |+* Re: Command Languages Versus Programming LanguagesStefan Ram
| || |   |   ||`* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   || `* Re: Command Languages Versus Programming LanguagesDavid Brown
| || |   |   ||  +- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||  +- Re: Command Languages Versus Programming LanguagesJohn Ames
| || |   |   ||  `* Re: Command Languages Versus Programming LanguagesKeith Thompson
| || |   |   ||   +* Re: Command Languages Versus Programming LanguagesRichard Kettlewell
| || |   |   ||   |+- Re: Command Languages Versus Programming LanguagesMuttley
| || |   |   ||   |`* Re: Command Languages Versus Programming LanguagesStefan Ram
| || |   |   ||   | `* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  +* Re: Command Languages Versus Programming LanguagesMuttley
| || |   |   ||   |  |+* Re: Command Languages Versus Programming Languagescandycanearter07
| || |   |   ||   |  ||`* Re: Command Languages Versus Programming LanguagesMuttley
| || |   |   ||   |  || `- Re: Command Languages Versus Programming Languagescandycanearter07
| || |   |   ||   |  |`* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  | `* Re: Command Languages Versus Programming LanguagesAlan Bawden
| || |   |   ||   |  |  +* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  |  |`* Re: Command Languages Versus Programming LanguagesJohn Ames
| || |   |   ||   |  |  | `* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  |  |  +* Re: Command Languages Versus Programming LanguagesJohn Ames
| || |   |   ||   |  |  |  |`* Re: Command Languages Versus Programming LanguagesRichard Kettlewell
| || |   |   ||   |  |  |  | +* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
| || |   |   ||   |  |  |  | |`- Re: Command Languages Versus Programming LanguagesRichard Kettlewell
| || |   |   ||   |  |  |  | `* Re: Command Languages Versus Programming LanguagesDavid Brown
| || |   |   ||   |  |  |  |  `* Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || |   |   ||   |  |  |  |   `* Re: Command Languages Versus Programming LanguagesDavid Brown
| || |   |   ||   |  |  |  `- Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   |   ||   |  |  +* Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   |   ||   |  |  +- Re: Command Languages Versus Programming Languagescandycanearter07
| || |   |   ||   |  |  `* Re: Command Languages Versus Programming LanguagesMuttley
| || |   |   ||   |  `* Re: Command Languages Versus Programming LanguagesJanis Papanagnou
| || |   |   ||   `* Re: Command Languages Versus Programming LanguagesDavid Brown
| || |   |   |`- Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   |   `- Re: Command Languages Versus Programming LanguagesKaz Kylheku
| || |   `- Re: Command Languages Versus Programming LanguagesLawrence D'Oliveiro
| || `- Re: Command Languages Versus Programming LanguagesAndreas Eder
| |+- Re: Command Languages Versus Programming LanguagesChristian Weisgerber
| |`* Re: Command Languages Versus Programming LanguagesDavid Brown
| `- Re: Command Languages Versus Programming LanguagesKaz Kylheku
+* Re: Command Languages Versus Programming LanguagesJohanne Fairchild
+* Re: Command Languages Versus Programming LanguagesDavid Brown
`* Re: Command Languages Versus Programming LanguagesDmitry A. Kazakov

Pages:12345678910111213
Football (Was: Too much? (Was: Command Languages Versus Programming Languages))

<uukob8$3bv02$1@news.xmission.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7864&group=comp.unix.shell#7864

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Football (Was: Too much? (Was: Command Languages Versus Programming Languages))
Date: Wed, 3 Apr 2024 23:22:16 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <uukob8$3bv02$1@news.xmission.com>
References: <uu54la$3su5b$6@dont-email.me> <uuhp3m$3ahp1$1@news.xmission.com> <uuj11l$3pqbb$1@dont-email.me> <uukndn$6jp4$1@dont-email.me>
Injection-Date: Wed, 3 Apr 2024 23:22:16 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3537922"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Wed, 3 Apr 2024 23:22 UTC

In article <uukndn$6jp4$1@dont-email.me>,
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>On 4/3/24 03:38, David Brown wrote:
>...
>> lottery, he bought his favourite football club (or "soccer club", for
>> those who come from a country where "football" doesn't involve feet or
>> round balls)
>
>I'm curious - in which country is "football" used as the name of a sport
>that doesn't involve feet? I know of many countries where "football"
>refers to a sport where the use of hands is prohibited, and others where
>it's allowed, but I'm not aware of any where the use of feet to kick the
>ball is prohibited.

You are, of course, nitpicking. American football, as I'm sure you're
aware, is almost entirely not played with the feet.

Yes, there is kicking involved, but it is a very small part of the game and
is almost irrelevant in the grand scheme of things.

Thus ends today's lecture on sports. You may resume your normally scheduled
programming. (See, that's a little joke, because this *is* a programming
newsgroup...)

--
(Cruz certainly has an odd face) ... it looks like someone sewed pieces of a
waterlogged Reagan mask together at gunpoint ...

http://www.rollingstone.com/politics/news/how-america-made-donald-trump-unstoppable-20160224

Re: Command Languages Versus Programming Languages

<uulnf2$hg6h$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7865&group=comp.unix.shell#7865

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Thu, 4 Apr 2024 08:13:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <uulnf2$hg6h$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org>
<LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
Injection-Date: Thu, 04 Apr 2024 08:13:22 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4f3283ee60a3ebcbca7b81ecdc077b86";
logging-data="573649"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197bca+frbKV1yPozORnZFA"
Cancel-Lock: sha1:9fexblOR+oLFf8+vD3iwV1M0e/8=
 by: Muttley@dastardlyhq.com - Thu, 4 Apr 2024 08:13 UTC

On Wed, 03 Apr 2024 17:16:31 +0100
Richard Kettlewell <invalid@invalid.invalid> wrote:
>Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> David Brown <david.brown@hesbynett.no> writes:
>>> On 03/04/2024 02:23, Lawrence D'Oliveiro wrote:
>>>> It’s bloody horrible Python even when wrapped correctly. I think
>>>> Python’s version of the conditional expression is a complete
>>>> abortion.
>>>
>>> That's probably the reason almost no one uses it. That post is the
>>> first time I have ever seen conditional expressions outside of a brief
>>> mention in a tutorial on Python conditionals showing how to write
>>> normal conditionals in the language. I think Python stole this one
>>> from Perl.
>>
>> No, Perl's conditional expressions use the same syntax as C's.
>>
>> As for whether Python's conditional expression syntax, it's not clear
>> that (cond ? expr1 : expr2) is better or worse than (expr1 if cond else
>> expr2) (unless you happen to be familiar with one of them).
>
>I’ve been familiar with both for years and I think the Python version is
>awful; in particular the ordering is a bizarre choice. The PEP where
>they worked out the design acknowledges this but then they went ahead
>and did it anyway...

I believe its known as being different for the sake of being different which
is closely related to change for changes sake. Its the reason screwed up the
WIndows GUI - a new generation of devs had to prove their could be different
to the previous one regardless of how badly their new version sucked. Or in
more general cases - we've all seen new managers come in and change processes
just to prove they were doing something.

Re: Command Languages Versus Programming Languages

<if-20240404121825@ram.dialup.fu-berlin.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7866&group=comp.unix.shell#7866

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: 4 Apr 2024 11:20:48 GMT
Organization: Stefan Ram
Lines: 19
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <if-20240404121825@ram.dialup.fu-berlin.de>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me> <20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me> <20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de> <LISP-20240402091729@ram.dialup.fu-berlin.de> <wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com> <wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de yoteiWOZAhLpZ4YMI2KohQM7acBmxFTdrqLwG5pHWhXrIZ
Cancel-Lock: sha1:cI/lHcd4cNVDsJ5r9XFV/QWKAIE= sha256:lfOjHr8Iz6z6Xlq6bIpGxJS+d19QMuOfX0mMR7A95lA=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Thu, 4 Apr 2024 11:20 UTC

Richard Kettlewell <invalid@invalid.invalid> wrote or quoted:
>I’ve been familiar with both for years and I think the Python version is
>awful; in particular the ordering is a bizarre choice.

The way this syntax is set up is apparently credited to
this guy named Guido, according to this PEP 308 thing.

Now, in English, we usually throw a comma in there when an
"if" clause comes first, 'cause it kinda throws off the normal
flow, you know? So that shows the default position for "if"
is actually after the main part. - Maybe Guido was making that
same kind of comparison to English, and that's why he decided
the post-"if" format works better.

In my example here, there were a whole bunch of these operators
all nested inside each other without any parentheses. And let
me tell you, when you start getting into that kind of nested
stuff with not parentheses in view, even the "?:" notation
can start looking pretty darn mysterious to some folks.

Re: Too much? (Was: Command Languages Versus Programming Languages)

<uumb6s$maqq$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7867&group=comp.unix.shell#7867

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris@mshome.net (Chris Elvidge)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Too much? (Was: Command Languages Versus Programming Languages)
Date: Thu, 4 Apr 2024 14:50:19 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <uumb6s$maqq$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87plv762zt.fsf@tudado.org>
<uuhkfp$3afj1$1@news.xmission.com> <UzYON.154262$TSTa.122307@fx47.iad>
<uuhp3m$3ahp1$1@news.xmission.com> <uuj11l$3pqbb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 04 Apr 2024 13:50:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="278cab86292d38fe0e0825a92f284e3b";
logging-data="731994"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DL6q3Gj0aaI1WsmjxKaomPOvbsXeW2Hw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:mx97uUoHVbNFkq4z3kRyKD07dZ8=
In-Reply-To: <uuj11l$3pqbb$1@dont-email.me>
Content-Language: en-GB
 by: Chris Elvidge - Thu, 4 Apr 2024 13:50 UTC

On 03/04/2024 at 08:38, David Brown wrote:
> One lottery winner managed this. When he won about £160M in the
> lottery, he bought his favourite football club (or "soccer club", for
> those who come from a country where "football" doesn't involve feet or
> round balls) and set it up as a trust owned by the club's fans.

I do wish people would stop intimating that the US is the only place
where Association Football (the football we play in the UK) is known as
soccer. When I was at secondary school (back in the 1960's) "soccer
practise" was a well know alternative to the term "football practise".

--
Chris Elvidge, England
I WILL NOT BE A SNICKERPUSS.

Re: Too much? (Was: Command Languages Versus Programming Languages)

<uumccv$mkbh$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7868&group=comp.unix.shell#7868

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!usenet.network!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Too much? (Was: Command Languages Versus Programming Languages)
Date: Thu, 4 Apr 2024 14:10:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <uumccv$mkbh$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87plv762zt.fsf@tudado.org>
<uuhkfp$3afj1$1@news.xmission.com> <UzYON.154262$TSTa.122307@fx47.iad>
<uuhp3m$3ahp1$1@news.xmission.com> <uuj11l$3pqbb$1@dont-email.me>
<uumb6s$maqq$1@dont-email.me>
Injection-Date: Thu, 04 Apr 2024 14:10:40 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4f3283ee60a3ebcbca7b81ecdc077b86";
logging-data="741745"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GQ9wY+yPBkWPwgXqyRIdb"
Cancel-Lock: sha1:R6q34tLZLh0rIRFJnJPkQcQOdag=
 by: Muttley@dastardlyhq.com - Thu, 4 Apr 2024 14:10 UTC

On Thu, 4 Apr 2024 14:50:19 +0100
Chris Elvidge <chris@mshome.net> wrote:
>On 03/04/2024 at 08:38, David Brown wrote:
>> One lottery winner managed this. When he won about £160M in the
>> lottery, he bought his favourite football club (or "soccer club", for
>> those who come from a country where "football" doesn't involve feet or
>> round balls) and set it up as a trust owned by the club's fans.
>
>I do wish people would stop intimating that the US is the only place
>where Association Football (the football we play in the UK) is known as
>soccer. When I was at secondary school (back in the 1960's) "soccer
>practise" was a well know alternative to the term "football practise".

IME the only people in the UK who call football "soccer" are rugger bugger
types.

Re: Too much? (Was: Command Languages Versus Programming Languages)

<uun058$rg1q$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7870&group=comp.unix.shell#7870

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Too much? (Was: Command Languages Versus Programming Languages)
Date: Thu, 4 Apr 2024 21:47:51 +0200
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <uun058$rg1q$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <87plv762zt.fsf@tudado.org>
<uuhkfp$3afj1$1@news.xmission.com> <UzYON.154262$TSTa.122307@fx47.iad>
<uuhp3m$3ahp1$1@news.xmission.com> <uuj11l$3pqbb$1@dont-email.me>
<uumb6s$maqq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 04 Apr 2024 19:47:52 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="120ac4c651a3755b57fb12ede9b881f4";
logging-data="901178"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Jow/uR+LbNHP+A0eJdPrL2n4ley/Dy5c="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:g0K1suKTzmPyCqER8Zi+b+vPsFo=
Content-Language: en-GB
In-Reply-To: <uumb6s$maqq$1@dont-email.me>
 by: David Brown - Thu, 4 Apr 2024 19:47 UTC

On 04/04/2024 15:50, Chris Elvidge wrote:
> On 03/04/2024 at 08:38, David Brown wrote:
>> One lottery winner managed this.  When he won about £160M in the
>> lottery, he bought his favourite football club (or "soccer club", for
>> those who come from a country where "football" doesn't involve feet or
>> round balls) and set it up as a trust owned by the club's fans.
>
> I do wish people would stop intimating that the US is the only place
> where Association Football (the football we play in the UK) is known as
> soccer. When I was at secondary school (back in the 1960's) "soccer
> practise" was a well know alternative to the term "football practise".
>

The term "soccer" is sometimes used in the UK, yes. It is most common
in schools or areas of the country where rugby (also occasionally known
as "Rugby Football") is popular.

But the term "football", unqualified, invariably means "soccer" - except
in the USA.

Re: Too much? (Was: Command Languages Versus Programming Languages)

<bMEPN.250515$Tp2.149553@usenetxs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7871&group=comp.unix.shell#7871

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.neodome.net!npeer.as286.net!npeer-ng0.as286.net!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx03.ams4.POSTED!not-for-mail
Newsgroups: comp.unix.shell
From: root@example.net (Mister Johnson)
Subject: Re: Too much? (Was: Command Languages Versus Programming Languages)
References: <uu54la$3su5b$6@dont-email.me> <87plv762zt.fsf@tudado.org>
<uuhkfp$3afj1$1@news.xmission.com> <UzYON.154262$TSTa.122307@fx47.iad>
<uuhp3m$3ahp1$1@news.xmission.com> <uuj11l$3pqbb$1@dont-email.me>
<uumb6s$maqq$1@dont-email.me>
Organization: without a 'zee'
X-Operating-System: Darwin 22.6.0 arm
X-Karjala-Takaisin: UKK
User-Agent: slrn/1.0.3 (Darwin)
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 14
Message-ID: <bMEPN.250515$Tp2.149553@usenetxs.com>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 04 Apr 2024 21:15:51 UTC
Date: Thu, 04 Apr 2024 21:15:51 GMT
X-Received-Bytes: 1655
 by: Mister Johnson - Thu, 4 Apr 2024 21:15 UTC

On 2024-04-04, Chris Elvidge <chris@mshome.net> wrote:
> On 03/04/2024 at 08:38, David Brown wrote:
>> One lottery winner managed this. When he won about £160M in the
>> lottery, he bought his favourite football club (or "soccer club", for
>> those who come from a country where "football" doesn't involve feet or
>> round balls) and set it up as a trust owned by the club's fans.
>
> I do wish people would stop intimating that the US is the only place
> where Association Football (the football we play in the UK) is known as
> soccer. When I was at secondary school (back in the 1960's) "soccer
> practise" was a well know alternative to the term "football practise".
>

+1

Re: Command Languages Versus Programming Languages

<uund4g$ugsb$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7872&group=comp.unix.shell#7872

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
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.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Thu, 4 Apr 2024 23:29:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uund4g$ugsb$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me>
<uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 04 Apr 2024 23:29:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="f5e959706a1ab93774d71c78cd2d7e1b";
logging-data="1000331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19LkYj4QD5uLCPV8QK0TwHs"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:CHdoEjfb56vNZ4lg1Iw9EWmMhgY=
 by: Lawrence D'Oliv - Thu, 4 Apr 2024 23:29 UTC

On 4 Apr 2024 11:20:48 GMT, Stefan Ram wrote:

> And let me tell you, when you start getting into that kind of nested
> stuff with not parentheses in view, even the "?:" notation can start
> looking pretty darn mysterious to some folks.

This is where indentation helps. E.g.

a =
b ?
c ? d : e
: f ?
g ? h : i
: j;

Re: Command Languages Versus Programming Languages

<uuofjh$19pfd$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7873&group=comp.unix.shell#7873

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Fri, 5 Apr 2024 09:17:37 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <uuofjh$19pfd$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me>
<uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de>
<uund4g$ugsb$1@dont-email.me>
Injection-Date: Fri, 05 Apr 2024 09:17:38 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ea34a2914be4a50473d0f8fb4079a58e";
logging-data="1369581"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qG5KP+fX8liV0KpjwjzT3"
Cancel-Lock: sha1:0M5pL6xi0+k4TURBnep7ku7BE/Q=
 by: Muttley@dastardlyhq.com - Fri, 5 Apr 2024 09:17 UTC

On Thu, 4 Apr 2024 23:29:21 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>On 4 Apr 2024 11:20:48 GMT, Stefan Ram wrote:
>
>> And let me tell you, when you start getting into that kind of nested
>> stuff with not parentheses in view, even the "?:" notation can start
>> looking pretty darn mysterious to some folks.
>
>This is where indentation helps. E.g.
>
> a =
> b ?
> c ? d : e
> : f ?
> g ? h : i
> : j;

Just use brackets. Saves a lot of pain.

Re: Command Languages Versus Programming Languages

<uuorf2$1chok$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7874&group=comp.unix.shell#7874

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: candycanearter07@candycanearter07.nomail.afraid (candycanearter07)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Fri, 5 Apr 2024 12:40:02 -0000 (UTC)
Organization: the-candyden-of-code
Lines: 24
Message-ID: <uuorf2$1chok$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me>
Injection-Date: Fri, 05 Apr 2024 12:40:03 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b2a32ba664ffdf88935a4461082c5c81";
logging-data="1459988"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wnDq6+fqK5JmRtjYuep35OVz0/rjgN8NlRbPbYKMxZA=="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:sALibexy+gBaPUqHJTMraG79mCc=
X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]%
b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx
`~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e
ZrQsWJ >|l^I_[pbsIqwoz.WGA]<D
 by: candycanearter07 - Fri, 5 Apr 2024 12:40 UTC

Muttley@dastardlyhq.com <Muttley@dastardlyhq.com> wrote at 09:17 this Friday (GMT):
> On Thu, 4 Apr 2024 23:29:21 -0000 (UTC)
> Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>>On 4 Apr 2024 11:20:48 GMT, Stefan Ram wrote:
>>
>>> And let me tell you, when you start getting into that kind of nested
>>> stuff with not parentheses in view, even the "?:" notation can start
>>> looking pretty darn mysterious to some folks.
>>
>>This is where indentation helps. E.g.
>>
>> a =
>> b ?
>> c ? d : e
>> : f ?
>> g ? h : i
>> : j;
>
> Just use brackets. Saves a lot of pain.

Or just use if blocks if it's too complex.
--
user <candycane> is generated from /dev/urandom

Re: Command Languages Versus Programming Languages

<uup47r$1elvc$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7875&group=comp.unix.shell#7875

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Fri, 5 Apr 2024 15:09:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <uup47r$1elvc$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me>
<uuorf2$1chok$1@dont-email.me>
Injection-Date: Fri, 05 Apr 2024 15:09:47 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ea34a2914be4a50473d0f8fb4079a58e";
logging-data="1529836"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gbDXX1EEAbLZx3bLj5xPX"
Cancel-Lock: sha1:FLACI9DsSdGxBOQFUHU2i2fJRq8=
 by: Muttley@dastardlyhq.com - Fri, 5 Apr 2024 15:09 UTC

On Fri, 5 Apr 2024 12:40:02 -0000 (UTC)
candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> wrote:
>Muttley@dastardlyhq.com <Muttley@dastardlyhq.com> wrote at 09:17 this Friday
>(GMT):
>> On Thu, 4 Apr 2024 23:29:21 -0000 (UTC)
>> Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>>>On 4 Apr 2024 11:20:48 GMT, Stefan Ram wrote:
>>>
>>>> And let me tell you, when you start getting into that kind of nested
>>>> stuff with not parentheses in view, even the "?:" notation can start
>>>> looking pretty darn mysterious to some folks.
>>>
>>>This is where indentation helps. E.g.
>>>
>>> a =
>>> b ?
>>> c ? d : e
>>> : f ?
>>> g ? h : i
>>> : j;
>>
>> Just use brackets. Saves a lot of pain.
>
>
>Or just use if blocks if it's too complex.

Indeed. It might not look as "l33t", but with modern compilers it'll end
up as the same assembler anyway.

Re: Command Languages Versus Programming Languages

<uup8ul$1fr2t$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7876&group=comp.unix.shell#7876

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Fri, 5 Apr 2024 18:30:12 +0200
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <uup8ul$1fr2t$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me>
<uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 05 Apr 2024 16:30:13 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7bb916d2050ea2724cd5f30d6d12a41b";
logging-data="1567837"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19D9g6Ifm/ECy8od+SQ56B4"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Goxp2Mhh1ey92dnaV47ld37BqAY=
In-Reply-To: <uund4g$ugsb$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Fri, 5 Apr 2024 16:30 UTC

On 05.04.2024 01:29, Lawrence D'Oliveiro wrote:
> On 4 Apr 2024 11:20:48 GMT, Stefan Ram wrote:
>
>> And let me tell you, when you start getting into that kind of nested
>> stuff with not parentheses in view, even the "?:" notation can start
>> looking pretty darn mysterious to some folks.
>
> This is where indentation helps. E.g.
>
> a =
> b ?
> c ? d : e
> : f ?
> g ? h : i
> : j;
>

Indentation generally helps. In above code (in my book) it's not
that clear [from the indentation], e.g. where the last ':' 'else'
belongs to. So I'd have lined the colons up with the respective
'?'. (YMMV.)

Not all languages differentiate (per syntax) a conditional command
from a conditional expression. Here are the two forms supported by
Algol for both, statements and expressions (here the examples are
both depicted for expressions only)

a :=
( b | ( c | d | e )
| ( f | ( g | h | i )
| j ) );

The parenthesis are not used for grouping, but are the alternative
form for IF/THEN/ELSE/FI

a := IF b
THEN
IF c THEN d ELSE e FI
ELSE
IF f THEN
IF g THEN h ELSE i FI
ELSE j FI
FI

Pick your choice depending on the case (or taste).

Janis

Re: Command Languages Versus Programming Languages

<indentation-20240405183703@ram.dialup.fu-berlin.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7878&group=comp.unix.shell#7878

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: 5 Apr 2024 17:37:52 GMT
Organization: Stefan Ram
Lines: 26
Expires: 1 Feb 2025 11:59:58 GMT
Message-ID: <indentation-20240405183703@ram.dialup.fu-berlin.de>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me> <20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me> <20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de> <LISP-20240402091729@ram.dialup.fu-berlin.de> <wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com> <wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk> <if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me> <uup8ul$1fr2t$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de vXjtoikWKm8wzHnU2zvKCQ7vjSy2Q9hSiKE5YpVhQoTa3s
Cancel-Lock: sha1:MrYECv3UxwpioTtPeqT0ES0AMyg= sha256:PX9LQSXG5Pxxng9fDZNxNcL+pfDlNUWWdWMeoG1vR48=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
 by: Stefan Ram - Fri, 5 Apr 2024 17:37 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote or quoted:
>On 05.04.2024 01:29, Lawrence D'Oliveiro wrote:
>>This is where indentation helps. E.g.
>> a =
>> b ?
>> c ? d : e
>> : f ?
>> g ? h : i
>> : j;
>>
>Indentation generally helps.

Let me give it a try to find how I would indent that!

b?
c? d: e:
f?
g? h: i:
j;

>The parenthesis are not used for grouping, but are the alternative
>form for IF/THEN/ELSE/FI

It's funny how the discussion oscillates between
"too many parentheses" (LISP code) and "not enough parentheses"
("let me add some parens to improve readability").

Re: Command Languages Versus Programming Languages

<20240405132341.870@kylheku.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7880&group=comp.unix.shell#7880

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 643-408-1753@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Fri, 5 Apr 2024 20:47:40 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 153
Message-ID: <20240405132341.870@kylheku.com>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uup8ul$1fr2t$1@dont-email.me>
Injection-Date: Fri, 05 Apr 2024 20:47:41 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ceb148ea878d94e466846d7273339ae5";
logging-data="1688663"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19h5aNcfipgg/nNbG1iiZouV9NRNS7NQgA="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:Jbr6ZwqBJjJkL9PdaQTyMCAj1oM=
 by: Kaz Kylheku - Fri, 5 Apr 2024 20:47 UTC

On 2024-04-05, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> On 05.04.2024 01:29, Lawrence D'Oliveiro wrote:
>> On 4 Apr 2024 11:20:48 GMT, Stefan Ram wrote:
>>
>>> And let me tell you, when you start getting into that kind of nested
>>> stuff with not parentheses in view, even the "?:" notation can start
>>> looking pretty darn mysterious to some folks.
>>
>> This is where indentation helps. E.g.
>>
>> a =
>> b ?
>> c ? d : e
>> : f ?
>> g ? h : i
>> : j;
>>
>
> Indentation generally helps. In above code (in my book) it's not
> that clear [from the indentation], e.g. where the last ':' 'else'
> belongs to. So I'd have lined the colons up with the respective
> '?'. (YMMV.)
>
> Not all languages differentiate (per syntax) a conditional command
> from a conditional expression. Here are the two forms supported by
> Algol for both, statements and expressions (here the examples are
> both depicted for expressions only)
>
> a :=
> ( b | ( c | d | e )
> | ( f | ( g | h | i )
> | j ) );
>
> The parenthesis are not used for grouping, but are the alternative
> form for IF/THEN/ELSE/FI
>
> a := IF b
> THEN
> IF c THEN d ELSE e FI
> ELSE
> IF f THEN
> IF g THEN h ELSE i FI
> ELSE j FI
> FI
>
> Pick your choice depending on the case (or taste).

#define XCAT(A, B) A ## B
#define CAT(A, B) XCAT(A, B)

#define IF(A, B, C) ((A) ? (B) : (C))

#define COND_2(cond, then, ...) IF(cond, then, 0)
#define COND_4(cond, then, ...) IF(cond, then, COND_2(__VA_ARGS__))
#define COND_6(cond, then, ...) IF(cond, then, COND_4(__VA_ARGS__))
#define COND_8(cond, then, ...) IF(cond, then, COND_6(__VA_ARGS__))

#define COND_1(...) {syntax error}
#define COND_3(...) {syntax error}
#define COND_5(...) {syntax error}
#define COND_7(...) {syntax error}

#define COUNT_ARGS(...) COUNT_ARGS_IMPL(__VA_ARGS__, 8, 7, 6, 5, 4, 3, 2, 1)
#define COUNT_ARGS_IMPL(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N

#define COND(...) CAT(COND_, COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__)

Now we can do:

COND(b, ...,
f, ...
1, j)

filling in the ...:

COND(b, IF(c, d, e),
f, IF(g, h, i),
1, j)

The GNU preprocessor gives me this:

((b) ? (((c) ? (d) : (e))) : (((f) ? (((g) ? (h) : (i))) : (((1) ? (j) : (0))))))

which looks correct.

The code is readable now, and importantly, my editor can format it. If I
start adding line breaks, it's indented right. If I turn it into this:

COND(b, IF(c, d, e),
f, IF(g, h, i),
1, j)

then highlight it in Vim and hit =, it gets put back the way it was.

If I add line breaks into the IFs, they get automatically indented
right, just using Vim's support for basic C formatting of macro/function
calls:

cond(b, IF(c,
d,
e),
f, IF(g,
h,
i),
1, j)

Compared to wrestling with five ways of formatting the the ill-conceived
?: syntax, it's a complete no brainer.

Here is a version where the cond pairs have to be parenthesized.
We can lose the even/odd argument count handling, and might as well
extend to up to 8 clauses:

#define IF(A, B, C) ((A) ? (B) : (C))

#define XCAT(A, B) A ## B
#define CAT(A, B) XCAT(A, B)

#define COND_PAIR(pair, rest) IF(COND_COND pair, COND_THEN pair, rest)
#define COND_COND(cond, then) cond
#define COND_THEN(cond, then) then
#define COND_1(pair, ...) COND_PAIR(pair, 0)
#define COND_2(pair, ...) COND_PAIR(pair, COND_1(__VA_ARGS__))
#define COND_3(pair, ...) COND_PAIR(pair, COND_2(__VA_ARGS__))
#define COND_4(pair, ...) COND_PAIR(pair, COND_3(__VA_ARGS__))
#define COND_5(pair, ...) COND_PAIR(pair, COND_4(__VA_ARGS__))
#define COND_6(pair, ...) COND_PAIR(pair, COND_5(__VA_ARGS__))
#define COND_7(pair, ...) COND_PAIR(pair, COND_6(__VA_ARGS__))
#define COND_8(pair, ...) COND_PAIR(pair, COND_7(__VA_ARGS__))

#define COUNT_ARGS(...) COUNT_ARGS_IMPL(__VA_ARGS__, 8, 7, 6, 5, 4, 3, 2, 1)
#define COUNT_ARGS_IMPL(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N

#define COND(...) CAT(COND_, COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__)

COND((b, IF(c,
d,
d)),
(f, IF(g,
h,
i)),
(1, j))

The expansion is still

((b) ? (((c) ? (d) : (d))) : (((f) ? (((g) ? (h) : (i))) : (((1) ? (j) : (0))))))

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

Re: Command Languages Versus Programming Languages

<uuq0a3$1lcgf$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7881&group=comp.unix.shell#7881

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
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.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Fri, 5 Apr 2024 23:08:52 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <uuq0a3$1lcgf$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me>
<uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uup8ul$1fr2t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 05 Apr 2024 23:08:52 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="9c4b8ade0cfa29f0e8cec442ac1d5e3b";
logging-data="1749519"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cBPfFD9CfB0U5F/ZD5TXe"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:v2I4tOf8nuRs9qXRaGo9m3WwbBc=
 by: Lawrence D'Oliv - Fri, 5 Apr 2024 23:08 UTC

On Fri, 5 Apr 2024 18:30:12 +0200, Janis Papanagnou wrote:

> Here are the two forms supported by Algol ...

Just a note, that’s Algol 68. In my time, “Algol” used unqualified was
understood to refer to Algol 60.

Re: Command Languages Versus Programming Languages

<uuq0fp$1lcgf$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7882&group=comp.unix.shell#7882

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
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.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Fri, 5 Apr 2024 23:11:54 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <uuq0fp$1lcgf$2@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me>
<uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 05 Apr 2024 23:11:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="9c4b8ade0cfa29f0e8cec442ac1d5e3b";
logging-data="1749519"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++fhwM6SA2S1YvHr+auYHn"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:cI9AZE4eFq2Wf9/0Jqnfwc08U5Y=
 by: Lawrence D'Oliv - Fri, 5 Apr 2024 23:11 UTC

On Fri, 5 Apr 2024 09:17:37 -0000 (UTC), Muttley wrote:

> On Thu, 4 Apr 2024 23:29:21 -0000 (UTC) Lawrence D'Oliveiro
> <ldo@nz.invalid> wrote:
>>
>>This is where indentation helps. E.g.
>>
>> a =
>> b ?
>> c ? d : e
>> : f ?
>> g ? h : i
>> : j;
>
> Just use brackets. Saves a lot of pain.

a=(b?(c?d:e):(f?(g?h:i):j));

The improvement speaks for itself.

Re: Command Languages Versus Programming Languages

<86frvzo01i.fsf@williamsburg.bawden.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7883&group=comp.unix.shell#7883

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!bawden.eternal-september.org!.POSTED!not-for-mail
From: alan@csail.mit.edu (Alan Bawden)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Fri, 05 Apr 2024 19:35:37 -0400
Organization: ITS Preservation Society
Lines: 25
Message-ID: <86frvzo01i.fsf@williamsburg.bawden.org>
References: <uu54la$3su5b$6@dont-email.me> <20240329101248.556@kylheku.com>
<uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com>
<uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com>
<uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org>
<uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org>
<LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de>
<uund4g$ugsb$1@dont-email.me> <uuofjh$19pfd$1@dont-email.me>
<uuq0fp$1lcgf$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Fri, 05 Apr 2024 23:35:55 +0200 (CEST)
Injection-Info: bawden.eternal-september.org; posting-host="05dd8971cdd4ad3c6c6c61a2aeccfb09";
logging-data="1761452"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mrr/QznS2s0Tz3wyjR4Uh"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Cancel-Lock: sha1:WgdpMSzu53Cr3HxH71iEFqxL9W0=
sha1:uT+Tx4BwS2FIS7nRVaLp+5qP3IE=
 by: Alan Bawden - Fri, 5 Apr 2024 23:35 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> writes:

On Fri, 5 Apr 2024 09:17:37 -0000 (UTC), Muttley wrote:
...
>> a =
>> b ?
>> c ? d : e
>> : f ?
>> g ? h : i
>> : j;
>
> Just use brackets. Saves a lot of pain.

a=(b?(c?d:e):(f?(g?h:i):j));

A normal programmer would write something like:

a = b ? (c ? d : e) :
f ? (g ? h : i) :
j;

I.e., she would allow herself to use spaces and newlines, and just
enough parentheses to make the structure clear.

- Alan

Re: Command Languages Versus Programming Languages

<uuq4q9$1mbbf$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7884&group=comp.unix.shell#7884

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
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.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 6 Apr 2024 00:25:45 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <uuq4q9$1mbbf$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <20240329101248.556@kylheku.com>
<uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com>
<uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com>
<uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org>
<uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org>
<LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me>
<uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me> <uuq0fp$1lcgf$2@dont-email.me>
<86frvzo01i.fsf@williamsburg.bawden.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 06 Apr 2024 00:25:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="9c4b8ade0cfa29f0e8cec442ac1d5e3b";
logging-data="1781103"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bBtMf0PjCfkaTcqGA5TdC"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:mRRnp96rm8XhSaAcjhjGDCxX/08=
 by: Lawrence D'Oliv - Sat, 6 Apr 2024 00:25 UTC

On Fri, 05 Apr 2024 19:35:37 -0400, Alan Bawden wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
> On Fri, 5 Apr 2024 09:17:37 -0000 (UTC), Muttley wrote:
> ...
> >> a =
> >> b ?
> >> c ? d : e
> >> : f ?
> >> g ? h : i
> >> : j;
> >
> > Just use brackets. Saves a lot of pain.
>
> a=(b?(c?d:e):(f?(g?h:i):j));
>
> A normal programmer would write something like:
>
> a = b ? (c ? d : e) :
> f ? (g ? h : i) :
> j;
>
> I.e., she would allow herself to use spaces and newlines, and just
> enough parentheses to make the structure clear.

It’s like, I don’t know ... you’re trying to save space. Why?

It’s like programming inside an apartment block, instead of having a
bungalow with a yard of your own.

Re: Command Languages Versus Programming Languages

<20240405175329.336@kylheku.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7885&group=comp.unix.shell#7885

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 643-408-1753@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 6 Apr 2024 01:01:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <20240405175329.336@kylheku.com>
References: <uu54la$3su5b$6@dont-email.me> <20240329101248.556@kylheku.com>
<uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com>
<uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com>
<uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org>
<uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org>
<LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me> <uuq0fp$1lcgf$2@dont-email.me>
<86frvzo01i.fsf@williamsburg.bawden.org>
Injection-Date: Sat, 06 Apr 2024 01:01:48 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="087afdf11801ba099c0d8e1d4262b803";
logging-data="1792348"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OUv9+CJ7nbc+zcBYJ2TBi3Tvtft2nPSM="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:xF8036ALwAa319a1i+/D/WiZosc=
 by: Kaz Kylheku - Sat, 6 Apr 2024 01:01 UTC

On 2024-04-05, Alan Bawden <alan@csail.mit.edu> wrote:
> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
> On Fri, 5 Apr 2024 09:17:37 -0000 (UTC), Muttley wrote:
> ...
> >> a =
> >> b ?
> >> c ? d : e
> >> : f ?
> >> g ? h : i
> >> : j;
> >
> > Just use brackets. Saves a lot of pain.
>
> a=(b?(c?d:e):(f?(g?h:i):j));
>
> A normal programmer would write something like:
>
> a = b ? (c ? d : e) :
> f ? (g ? h : i) :
> j;
>
> I.e., she would allow herself to use spaces and newlines, and just
> enough parentheses to make the structure clear.

It looks good, undeniably.

However, I cannot tell at a glance whether or not the nice appearance
isn't telling me some kind of lie. That's an inherent problem with
the ternary operator.

I have to remember that = has lower precedence than ?:. But, ==
has higher precedence. So this careless edit makes it wrong,
even though it still looks just as nice:

a == b ? (c ? d : e) :
f ? (g ? h : i) :
j;

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

Re: Command Languages Versus Programming Languages

<uuq7dd$1mrp3$3@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7886&group=comp.unix.shell#7886

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: candycanearter07@candycanearter07.nomail.afraid (candycanearter07)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 6 Apr 2024 01:10:05 -0000 (UTC)
Organization: the-candyden-of-code
Lines: 35
Message-ID: <uuq7dd$1mrp3$3@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
<20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
<20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
<20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
<20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
<87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
<87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me> <uuorf2$1chok$1@dont-email.me>
<uup47r$1elvc$1@dont-email.me>
Injection-Date: Sat, 06 Apr 2024 01:10:05 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="bad612f9278d4822db42e3d039f9825f";
logging-data="1797923"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qQzpCd8s1kmtbBDkkppJzbvm5d6rpPIQMWkmla1rRug=="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:MSR8R/4O1wRcDv/MJchpibtPmMA=
X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]%
b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx
`~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e
ZrQsWJ >|l^I_[pbsIqwoz.WGA]<D
 by: candycanearter07 - Sat, 6 Apr 2024 01:10 UTC

Muttley@dastardlyhq.com <Muttley@dastardlyhq.com> wrote at 15:09 this Friday (GMT):
> On Fri, 5 Apr 2024 12:40:02 -0000 (UTC)
> candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> wrote:
>>Muttley@dastardlyhq.com <Muttley@dastardlyhq.com> wrote at 09:17 this Friday
>>(GMT):
>>> On Thu, 4 Apr 2024 23:29:21 -0000 (UTC)
>>> Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>>>>On 4 Apr 2024 11:20:48 GMT, Stefan Ram wrote:
>>>>
>>>>> And let me tell you, when you start getting into that kind of nested
>>>>> stuff with not parentheses in view, even the "?:" notation can start
>>>>> looking pretty darn mysterious to some folks.
>>>>
>>>>This is where indentation helps. E.g.
>>>>
>>>> a =
>>>> b ?
>>>> c ? d : e
>>>> : f ?
>>>> g ? h : i
>>>> : j;
>>>
>>> Just use brackets. Saves a lot of pain.
>>
>>
>>Or just use if blocks if it's too complex.
>
> Indeed. It might not look as "l33t", but with modern compilers it'll end
> up as the same assembler anyway.

Yeah. Not everything needs to be a hyper optimized single line
statement.
--
user <candycane> is generated from /dev/urandom

Re: Command Languages Versus Programming Languages

<uuq7de$1mrp3$4@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7887&group=comp.unix.shell#7887

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: candycanearter07@candycanearter07.nomail.afraid (candycanearter07)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 6 Apr 2024 01:10:06 -0000 (UTC)
Organization: the-candyden-of-code
Lines: 32
Message-ID: <uuq7de$1mrp3$4@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <20240329101248.556@kylheku.com>
<uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com>
<uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com>
<uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org>
<uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org>
<LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me> <uuq0fp$1lcgf$2@dont-email.me>
<86frvzo01i.fsf@williamsburg.bawden.org>
Injection-Date: Sat, 06 Apr 2024 01:10:06 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="bad612f9278d4822db42e3d039f9825f";
logging-data="1797923"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dvOtqh2II5BLU8mRKlM0QwtjE3ivpo9KsDP4TqIh2RA=="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:gB+OGT/etEKgCxM4pw3OgN93sH0=
X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]%
b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx
`~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e
ZrQsWJ >|l^I_[pbsIqwoz.WGA]<D
 by: candycanearter07 - Sat, 6 Apr 2024 01:10 UTC

Alan Bawden <alan@csail.mit.edu> wrote at 23:35 this Friday (GMT):
> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
> On Fri, 5 Apr 2024 09:17:37 -0000 (UTC), Muttley wrote:
> ...
> >> a =
> >> b ?
> >> c ? d : e
> >> : f ?
> >> g ? h : i
> >> : j;
> >
> > Just use brackets. Saves a lot of pain.
>
> a=(b?(c?d:e):(f?(g?h:i):j));
>
> A normal programmer would write something like:
>
> a = b ? (c ? d : e) :
> f ? (g ? h : i) :
> j;
>
v (she?)
> I.e., she would allow herself to use spaces and newlines, and just
> enough parentheses to make the structure clear.
>
> - Alan

Yeah, a bit of space for the code to breathe goes a long way.
--
user <candycane> is generated from /dev/urandom

Re: Command Languages Versus Programming Languages

<uur2s5$2064m$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7888&group=comp.unix.shell#7888

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 6 Apr 2024 08:58:45 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <uur2s5$2064m$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me> <20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me> <20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de> <LISP-20240402091729@ram.dialup.fu-berlin.de> <wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com> <wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk> <if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me> <uup8ul$1fr2t$1@dont-email.me>
<indentation-20240405183703@ram.dialup.fu-berlin.de>
Injection-Date: Sat, 06 Apr 2024 08:58:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d81f18974ff1c6de54f7711b915d74e6";
logging-data="2103446"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TxB/9r7cfyHT7662YZHnu"
Cancel-Lock: sha1:98hNte1+tQP/IPCYowdAogplabw=
 by: Muttley@dastardlyhq.com - Sat, 6 Apr 2024 08:58 UTC

On 5 Apr 2024 17:37:52 GMT
ram@zedat.fu-berlin.de (Stefan Ram) wrote:
>Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote or quoted:
>>On 05.04.2024 01:29, Lawrence D'Oliveiro wrote:
>>>This is where indentation helps. E.g.
>>> a =
>>> b ?
>>> c ? d : e
>>> : f ?
>>> g ? h : i
>>> : j;
>>>
>>Indentation generally helps.
>
> Let me give it a try to find how I would indent that!
>
>b?
> c? d: e:
> f?
> g? h: i:
> j;
>
>>The parenthesis are not used for grouping, but are the alternative
>>form for IF/THEN/ELSE/FI
>
> It's funny how the discussion oscillates between
> "too many parentheses" (LISP code) and "not enough parentheses"
> ("let me add some parens to improve readability").

Lisp overloads them as block markers which simply makes the code more
confusing, not less.

Re: Command Languages Versus Programming Languages

<uur2us$207b3$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7889&group=comp.unix.shell#7889

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 6 Apr 2024 09:00:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <uur2us$207b3$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <20240329101248.556@kylheku.com>
<uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com>
<uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com>
<uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org>
<uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org>
<LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de>
<uui7hf$3gona$1@dont-email.me> <uuj1o5$3pvnq$1@dont-email.me>
<87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de>
<uund4g$ugsb$1@dont-email.me> <uuofjh$19pfd$1@dont-email.me>
<uuq0fp$1lcgf$2@dont-email.me>
<86frvzo01i.fsf@williamsburg.bawden.org>
Injection-Date: Sat, 06 Apr 2024 09:00:13 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d81f18974ff1c6de54f7711b915d74e6";
logging-data="2104675"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Lx65rTX/VJO7lBwO7Jscl"
Cancel-Lock: sha1:Ylt7vE3hvoNEO4HNHxR+xxemhXY=
 by: Muttley@dastardlyhq.com - Sat, 6 Apr 2024 09:00 UTC

On Fri, 05 Apr 2024 19:35:37 -0400
Alan Bawden <alan@csail.mit.edu> wrote:
>Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
> On Fri, 5 Apr 2024 09:17:37 -0000 (UTC), Muttley wrote:
> ...
> >> a =
> >> b ?
> >> c ? d : e
> >> : f ?
> >> g ? h : i
> >> : j;
> >
> > Just use brackets. Saves a lot of pain.
>
> a=(b?(c?d:e):(f?(g?h:i):j));
>
>A normal programmer would write something like:
>
> a = b ? (c ? d : e) :
> f ? (g ? h : i) :
> j;
>
>I.e., she would allow herself to use spaces and newlines, and just

ITYM "he" would allow HIMself.

Lets give the woke BS a miss, 95% of developers are men. It doesn't give you
any brownie points, just makes you look a try-hard ass.

Re: Command Languages Versus Programming Languages

<uurjjf$2409m$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7890&group=comp.unix.shell#7890

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 6 Apr 2024 15:44:13 +0200
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <uurjjf$2409m$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <20240329101248.556@kylheku.com>
<uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com>
<uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com>
<uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org>
<uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org>
<LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me>
<uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me> <uuq0fp$1lcgf$2@dont-email.me>
<86frvzo01i.fsf@williamsburg.bawden.org> <20240405175329.336@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 06 Apr 2024 13:44:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0149db67b3dde4585d7702654d770ca9";
logging-data="2228534"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hYKSutBft+ST/qLIq7/uN3gkiLzyVtRs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:R+6Ys7H7Fq+37FD0EHLNOXvHuGM=
Content-Language: en-GB
In-Reply-To: <20240405175329.336@kylheku.com>
 by: David Brown - Sat, 6 Apr 2024 13:44 UTC

On 06/04/2024 03:01, Kaz Kylheku wrote:
> On 2024-04-05, Alan Bawden <alan@csail.mit.edu> wrote:
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>> On Fri, 5 Apr 2024 09:17:37 -0000 (UTC), Muttley wrote:
>> ...
>> >> a =
>> >> b ?
>> >> c ? d : e
>> >> : f ?
>> >> g ? h : i
>> >> : j;
>> >
>> > Just use brackets. Saves a lot of pain.
>>
>> a=(b?(c?d:e):(f?(g?h:i):j));
>>
>> A normal programmer would write something like:
>>
>> a = b ? (c ? d : e) :
>> f ? (g ? h : i) :
>> j;
>>
>> I.e., she would allow herself to use spaces and newlines, and just
>> enough parentheses to make the structure clear.
>
> It looks good, undeniably.
>
> However, I cannot tell at a glance whether or not the nice appearance
> isn't telling me some kind of lie. That's an inherent problem with
> the ternary operator.

That's a key point - and it is not just with the ternary operator, but a
general issue. Good spacing, indentation, newlines and layout make code
easier to read. But it is vital that there is never any doubt that the
layout matches the meaning of the code. If not, then you might be sure
what the programmer meant dues to the layout, but you are not sure that
the compiler sees it the same way. After all, this looks neat and clear
too :

a =
b & c +
d & e +
f & g

But the language viewpoint (assuming it is in C, or a language with
similar precedences) and the code appearance are very different.

Parentheses help, until there are too many to be easily tracked by the
reader. Splitting the expression into parts, adding new local
variables, using separate statements, making new helper functions -
these are all ways to improve the code, and have no efficiency cost with
modern tools.

A lot of people think the layout of code should make the programmer's
intentions clear, and make it easy to see what the code does. That's
true, but it is not enough. Code layout should also make it easy to see
that the code does what the programmer intended. It should be easy for
a maintainer to modify it without introducing errors. It should also be
hard for a reader to misinterpret it (which is not the same as saying it
should be easy to interpret correctly). It should be hard for a
maintainer to make mistakes. It should be easy to spot any mistakes
that get made.

>
> I have to remember that = has lower precedence than ?:. But, ==
> has higher precedence. So this careless edit makes it wrong,
> even though it still looks just as nice:
>
> a == b ? (c ? d : e) :
> f ? (g ? h : i) :
> j;
>

Re: Command Languages Versus Programming Languages

<uuro8t$2544n$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7891&group=comp.unix.shell#7891

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Command Languages Versus Programming Languages
Date: Sat, 6 Apr 2024 15:03:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <uuro8t$2544n$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <20240329101248.556@kylheku.com>
<uu6t9h$dq4d$1@dont-email.me> <20240329104716.777@kylheku.com>
<uu8p02$uebm$1@dont-email.me> <20240330112105.553@kylheku.com>
<uudrfg$2cskm$1@dont-email.me> <87r0fp8lab.fsf@tudado.org>
<uuehdj$2hshe$1@dont-email.me> <87wmpg7gpg.fsf@tudado.org>
<LISP-20240402085115@ram.dialup.fu-berlin.de>
<LISP-20240402091729@ram.dialup.fu-berlin.de>
<wrap-20240402092558@ram.dialup.fu-berlin.de> <uui7hf$3gona$1@dont-email.me>
<uuj1o5$3pvnq$1@dont-email.me> <87plv6jv1i.fsf@nosuchdomain.example.com>
<wwv5xwyifq8.fsf@LkoBDZeT.terraraq.uk>
<if-20240404121825@ram.dialup.fu-berlin.de> <uund4g$ugsb$1@dont-email.me>
<uuofjh$19pfd$1@dont-email.me> <uuq0fp$1lcgf$2@dont-email.me>
<86frvzo01i.fsf@williamsburg.bawden.org> <20240405175329.336@kylheku.com>
<uurjjf$2409m$1@dont-email.me>
Injection-Date: Sat, 06 Apr 2024 15:03:58 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d81f18974ff1c6de54f7711b915d74e6";
logging-data="2265239"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ej5hhBXBievpVrkB97qks"
Cancel-Lock: sha1:HM+jevOuEQAM352TO3rulcYiOFQ=
 by: Muttley@dastardlyhq.com - Sat, 6 Apr 2024 15:03 UTC

On Sat, 6 Apr 2024 15:44:13 +0200
David Brown <david.brown@hesbynett.no> wrote:
>A lot of people think the layout of code should make the programmer's
>intentions clear, and make it easy to see what the code does. That's

Unfortunately IME another lot (usually young) seem to think that the more
complicated their make their code the more it will impress their peers and/or
boss. This seems to be a particular problem with C++ as its current overspecced
and overcomplicated syntax allows you to write code that would make a Perl dev
envious.


devel / comp.unix.shell / Re: Command Languages Versus Programming Languages

Pages:12345678910111213
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor