Deutsch   English   Français   Italiano  
<vgnk4s$3pd66$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: else ladders practice
Date: Sat, 9 Nov 2024 12:21:47 +0000
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <vgnk4s$3pd66$1@dont-email.me>
References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org>
 <vg0t3j$2ruor$1@dont-email.me>
 <78eabb4054783e30968ae5ffafd6b4ff2e5a5f17@i2pn2.org>
 <vg2g37$37mh3$1@dont-email.me> <6724CFD2.4030607@grunge.pl>
 <vg2llt$38ons$1@dont-email.me>
 <2491a699388b5891a49ef960e1ad8bb689fdc2ed@i2pn2.org>
 <b681ee05856e165c26a5c29bf42a8d9d53843d6d@i2pn2.org>
 <vg2ttn$3a4lk$1@dont-email.me> <vg33gs$3b8n5$1@dont-email.me>
 <vg358c$3bk7t$1@dont-email.me> <vg37nr$3bo0c$1@dont-email.me>
 <vg3b98$3cc8q$1@dont-email.me> <vg5351$3pada$1@dont-email.me>
 <vg62vg$3uv02$1@dont-email.me> <vg8a84$euka$1@dont-email.me>
 <vgli8o$39tog$1@dont-email.me> <vgm33b$3c7q7$1@dont-email.me>
 <vgmmii$3jf48$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 09 Nov 2024 13:21:49 +0100 (CET)
Injection-Info: dont-email.me; posting-host="3a299272b8862feb369542603f9244e6";
	logging-data="3978438"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX198NknLymHl4JFiAHWpRcHC"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9pGzNE9F5veE01qC5s3K3WS3wIM=
In-Reply-To: <vgmmii$3jf48$1@dont-email.me>
Content-Language: en-GB
Bytes: 3636

On 09/11/2024 03:57, Janis Papanagnou wrote:
> On 08.11.2024 23:24, Bart wrote:
>> On 08/11/2024 17:37, Janis Papanagnou wrote:
>>>
>>> BTW, the same symbols can also be used as an alternative form
>>> of the 'case' statement; the semantic distinction is made by
>>> context, e.g. the types involved in the construct.
>>
>> You mean whether the 'a' in '(a | b... | c)' has type Bool rather than Int?
>>
>> I've always discriminated on the number of terms between the two |s:
>> either 1, or more than 1.
> 
> I suppose in a [historic] "C" like language it's impossible to
> distinguish on type here (given that there was no 'bool' type
> [in former times] in "C"). - But I'm not quite sure whether
> you're speaking here about your "C"-like language or some other
> language you implemented.

I currently have three HLL implementations:

* For my C subset language (originally I had some enhancements, now
   dropped)

* For my 'M' systems language inspired by A68 syntax

* For my 'Q' scripting language, with the same syntax, more or less

The remark was about those last two.

>>    if cond then
>>        s1
>>        s2
>>    else
>>        s3
>>        s4
>>    end
> 
> (Looks a lot more like a scripting language without semicolons.)

This is what I've long suspected: that people associate clear, 
pseudo-code-like syntax with scripting languages.

'Serious' ones apparently need to look the business with a lot of extra 
punctuation. The more clutter the better!

By that criteria, C++ is obviously more advanced than C:

C:     #include <stdio.h>
        printf("A=%d B=%d\n", a, b);

C++    #include <iostream>
        std::cout << "A=" << a << " " << "B=" << b << std::endl;

Maybe Zig even more so (normally you'd create a shorter alias to that
print):

Zig:   @import("std").debug.print("A={d} B={d}\n", .{a, b});

By that measure, mine probably looks like a toy:

M:     println =a, =b