| Deutsch English Français Italiano |
|
<87o75bwlp8.fsf@bsb.me.uk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse <ben@bsb.me.uk> Newsgroups: comp.lang.c Subject: Re: Top 10 most common hard skills listed on resumes... Date: Thu, 29 Aug 2024 13:35:47 +0100 Organization: A noiseless patient Spider Lines: 116 Message-ID: <87o75bwlp8.fsf@bsb.me.uk> References: <vab101$3er$1@reader1.panix.com> <vad7ns$1g27b$1@raubtier-asyl.eternal-september.org> <vad8lr$1fv5u$1@dont-email.me> <vaf7f0$k51$2@reader1.panix.com> <vafgb2$1to4v$2@dont-email.me> <92ab79736a70ea1563691d22a9b396a20629d8cf@i2pn2.org> <vafim7$1ubg8$1@dont-email.me> <vah4hr$2b9i8$5@dont-email.me> <vahngt$2dtm9$1@dont-email.me> <87r0abzcsj.fsf@bsb.me.uk> <vai1ec$2fns2$1@dont-email.me> <874j75zftu.fsf@bsb.me.uk> <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> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Thu, 29 Aug 2024 14:35:48 +0200 (CEST) Injection-Info: dont-email.me; posting-host="fea14ca971f37fc10e006db08518a19f"; logging-data="4170496"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oU8O4ZNsAfz9SbZxO29p4BvVbSP+YAqc=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:G6d7wTUgt6nJbzIohN3rEVF3R5k= sha1:40wh0bJ+wKatp3+N2Oiw2fjtO7c= X-BSB-Auth: 1.84ccbf187197ecb877db.20240829133547BST.87o75bwlp8.fsf@bsb.me.uk Bytes: 6377 Bart <bc@freeuk.com> writes: > On 29/08/2024 00:43, Ben Bacarisse wrote: >> Bart <bc@freeuk.com> writes: >> >>> On 28/08/2024 15:57, Ben Bacarisse wrote: >>>> Bart <bc@freeuk.com> writes: >>>> >>>>> On 28/08/2024 00:49, Ben Bacarisse wrote: >>>> >>>>>> Indeed, and BLISS is not like that. I had hoped to shed some light on >>>>>> why there is some logic to BLISS's rather idiosyncratic design. >>>>>> >>>>>>> Given a declaration like 'int A' then: >>>>>>> >>>>>>> BLISS C >>>>>>> >>>>>>> Read or write A's value .A A >>>>>> I don't think that's right. To change the value at address A (what I >>>>>> think you mean by "write A's value") you write >>>>>> A = 42; >>>>>> in BLISS. And to add one to the value at address A you write >>>>>> A = .A + 1; >>>>> >>>>> OK. That's just makes it more bizarre than I'd thought. >>>> Curious. It's what makes it consistent, though it is definitely an >>>> uncommon approach. >>>> >>>>> The example I saw >>>>> included these lines: >>>>> >>>>> GETNUM(X); ! returns a value via X >>>>> Y = STEP(.X); >>>>> PUTNUM(.Y) >>>>> >>>>> So in an rvalue context: X reads its address; while .X reads its >>>>> value. >>>> The whole point is to remove the two contexts. A variable name is >>>> /always/ an lvalue (which is why it can be assigned). C has an implicit >>>> lvalue to rvalue conversion in the contexts you have come to expect it. >>>> BLISS does not. You always need a dot to convert to an rvalue. >>> >>> This is the kind of thing I meant a few posts back. You don't need to take >>> A (which refers to some place where you can store values), and tell it to >>> fetch that value. Most HLLs will do that without being told. >>> >>> (My point was that that was a distinguishing feature of HLLs, which is >>> missing in Forth for example.) >> We are talking at cross purposes then. I was not addressing anything >> about your view of what makes an HLL. >> >>>>> But in an lvalue one: Y writes its value; .Y may not be defined >>>>> >>>>> It looks asymmetric. C like most languages is symmetric, you write 'A = A' >>>>> with the same syntax on both sides. >>>> Since assignment is inherently asymmetric (you can't write 3 = A but you >>>> can write A = 3) C's syntactic symmetry hides a semantic difference. >>>> What is needed on the two sides is not the same. >>> >>> I would argue that it is exactly the same. >> How do you argue that, given that A=3 is allowed and 3=A is not? > > I explained that. LHS and RHS can be identical terms for assignment in > pretty much every aspect, but there are extra constraints on the LHS. So you use "exactly the same" to mean "exactly the same except for the differences". I don't think this point needs any more discussion, do you? > In the case of : > > (c?a:b) = (z?x:y); > > C won't allow it, but some other languages will. > > Remember that the programmer can only express their intentions in the form > of syntax. > >> ... >>>>> I assume that in BLISS, A = A is legal, but does something odd like copy >>>>> A's address into itself. >>>> What's odd about that? And why call is a copy operation? Do you think >>>> of A = 42 as a copy operation? BLISS is a low-level system language. >>> >>> Why do you mean by call? >> Typo. I meant to write... And why call /it/ a copy-operation? Do you >> think of A = 42 as a copy operation? > > If '=' means assignment, then what else is it? That's was my question. You called it (in BLISS) a "copy" operation. Why did you use that term rather than just saying that "A = A assigns that address of A to the location A". I'm trying to find out if your use of the word copy rather than assign is interesting in some way. > I don't know why you're always so contradictory. Is it a game trying to > catch me out on some pendanty? It seems to be popular here. I wanted to explain how BLISS gets rid of the lvalue/rvalue distinction because you seemed to have misunderstood it. > This subthread started with me asking which HLL goes between Assembly and > C, if C was supposedly mid-level. I don't know how it got on discussing > what exactly assignment means. Because, unlike you, I want to understand you before commenting. It was a trivial question (made more complex by a typo if mine, for which I'm sorry). You found BLISS's meaning of A = A to be "odd" and you explained the "odd" by using the word "copy" rather than "assigns". I just wanted to know if there was more behind your use of the word. I don't think there is anything that needs further explanation because I think you just said "copy" when "assigns" would have done. -- Ben.