Deutsch   English   Français   Italiano  
<vbkr15$27l2o$2@paganini.bofh.team>

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

Path: ...!3.eu.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: Waldek Hebisch <antispam@fricas.org>
Newsgroups: comp.lang.c
Subject: Re: Top 10 most common hard skills listed on resumes...
Date: Sun, 8 Sep 2024 18:39:35 -0000 (UTC)
Organization: To protect and to server
Message-ID: <vbkr15$27l2o$2@paganini.bofh.team>
References: <vab101$3er$1@reader1.panix.com>   <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>
Injection-Date: Sun, 8 Sep 2024 18:39:35 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="2348120"; posting-host="WwiNTD3IIceGeoS5hCc4+A.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
X-Notice: Filtered by postfilter v. 0.9.3
Bytes: 2618
Lines: 53

Bart <bc@freeuk.com> wrote:
> 
> But the feature (using them in lvalue contexts) was rarely used.
> 
> (** This is:
> 
>     (a, b, c) = 0;
> 
> in C, which is illegal. But put in explicit pointers, and it's suddenly 
> fine:
> 
>     *(a, b, &c) = 0;
> 
> So why can't the compiler do that?)

The second really is

  (a, b, c = 0);

I do not know what you expect writing '(a, b, c) = 0', but the above
C meaning probably is not what you want.

I use language that allows:

  (a, b, c) := (b, c, a);

that is if there are 3 things on left hand side, then there must
be 3 things on the right hand side.  It also allows

  (a, b, c) := l;

but then l must be a list or record of 3 things (and entries in
order are assigned to things on the left hand side).

  (a, b, c) := 0;

would be valid only if '0' happended to be approprate list or record
so that case above would apply.  '0' is overloaded and user definable
so user in principle could do that.  But no sane person would
define such '0'.

BTW, in Pop11 this is

(1, 2, 3) -> (a, b, c);

and if you write

0 -> (a, b, c);

it assigns 0 to 'c' and grabs two items from the stack and assigns
them to 'a' and 'b' (empty stack signals error).

-- 
                              Waldek Hebisch