Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vbkff0$1vge6$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vbkff0$1vge6$1@dont-email.me>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: Re: Top 10 most common hard skills listed on resumes...
Date: Sun, 8 Sep 2024 17:22:08 +0200
Organization: A noiseless patient Spider
Lines: 94
Message-ID: <vbkff0$1vge6$1@dont-email.me>
References: <vab101$3er$1@reader1.panix.com> <valrj7$367a8$2@dont-email.me>
 <87mskwy9t1.fsf@bsb.me.uk> <vanq4h$3iieb$1@dont-email.me>
 <875xrkxlgo.fsf@bsb.me.uk> <vapitn$3u1ub$1@dont-email.me>
 <87o75bwlp8.fsf@bsb.me.uk> <vaps06$3vg8l$1@dont-email.me>
 <871q27weeh.fsf@bsb.me.uk> <20240829083200.195@kylheku.com>
 <87v7zjuyd8.fsf@bsb.me.uk> <20240829084851.962@kylheku.com>
 <87mskvuxe9.fsf@bsb.me.uk> <vaq9tu$1te8$1@dont-email.me>
 <vbci8r$1c9e8$1@paganini.bofh.team> <vbcs65$eabn$1@dont-email.me>
 <vbekut$1kd24$1@paganini.bofh.team> <vbepcb$q6p2$1@dont-email.me>
 <vbj6ii$1q6mh$1@dont-email.me> <vbjtmi$1sqao$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 08 Sep 2024 17:22:09 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="cedab109241535991cb224f8b499cda5";
	logging-data="2081222"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+3RkO0FWgQoZd7XMEL9Rh+"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:xxHaiwOad7SZ6bAsg4qb5rHH5us=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <vbjtmi$1sqao$1@dont-email.me>
Bytes: 4584

On 08.09.2024 12:18, Bart wrote:
> On 08/09/2024 04:44, Janis Papanagnou wrote:
>> On 06.09.2024 13:34, Bart wrote:
>>>
>>>     (c ? a : b) = x;
>>
>> In Algol 68 you can write
>>
>>      IF c THEN a ELSE b FI := x
>>
>> or, in a shorter form, as
>>
>>      ( c | a | b ) := x
>>
>> if you prefer.
> 
> But the feature (using them in lvalue contexts) was rarely used.

Sure.

>> [...]
>> This is only a "visual" symmetry, not a semantical one.
>>
>> The LHS of the Algol 68 example is of 'REF' (lvalue) type, as it would
>> be the case with a language that supports a syntax as you show it here.
> 
> This is where I differ from Algol68,

Since Algol 68 is conceptually an extremely well designed language
I don't expect such formally elaborated and consistent design in
any language of much lower level.

> where I had to considerably
> simplify the semantics to get something I could understand and implement.
> 
> Take this C:
> 
>     int A, B;
> 
>     A = B;
> 
> There are two types associated with the LHS: 'int*' which is the type
> the name A (its address), and 'int' which is the type of A's value.

Erm, no. The LHS of the assignment is a 'ref' 'int'; in "C" and in
(almost) all other languages I encountered. - If you have an issue
in seeing that, and with your decades of engagement with computers,
you may now have a serious practical effort to fix that view. (No
offense intended, honestly!)

> 
> So, why would a language choose int* over int as /the/ type of an
> assignment target?

I suspect the "C terminology" might be in the way of understanding.
If you intend to grasp the LHS type it's probably better as analogy
to take C++'s  'int &'  as the type of the LHS. (Probably the same
problem you had in understanding the "call by reference" concept,
which is also more like a '<type> &' and not a '<type> *'.)

> As far as the user is concerned, they're only dealing
> with int value types.

Only where values are (syntactically and semantically) expected.
Not at the LHS of an assignment. - I sense (but may be wrong) you
might have some ideas from the functional programming paradigm or
why don't you see (or can't accept) that?

> 
> If they have to consider that variables have addresses, then the same
> applies to B!

Not sure what you think here. - Others in this thread have already
codified the 'A = B' for explanation purposes using functions; e.g.

  assign (int &, int)

so let's add operator definitions from other languages

  int &  operator = (int & , int)

  OP ASSIGN  = (REF INT a, INT b)  REF INT

> 
> This is where I think Algol68 got it badly wrong.

I strongly suspect you have no clue.

Algol 68 as probably the formally mostly elaborated and consistent
language defines the assignment semantics not differently from any
other of the many existing languages that work with variables.

Janis