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 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: References: <87o75bwlp8.fsf@bsb.me.uk> <871q27weeh.fsf@bsb.me.uk> <20240829083200.195@kylheku.com> <87v7zjuyd8.fsf@bsb.me.uk> <20240829084851.962@kylheku.com> <87mskvuxe9.fsf@bsb.me.uk> 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 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