| Deutsch English Français Italiano |
|
<87seurdqts.fsf@nosuchdomain.example.com> 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: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Top 10 most common hard skills listed on resumes...
Date: Mon, 26 Aug 2024 12:30:55 -0700
Organization: None to speak of
Lines: 46
Message-ID: <87seurdqts.fsf@nosuchdomain.example.com>
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>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Mon, 26 Aug 2024 21:30:56 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="bc88295ca556238feaf2ba55fe5de0e2";
logging-data="2722092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pbsT5JuapRPenh68iArfe"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:6PQF8dzRomD9+Zx99ts2bFNOapU=
sha1:iMbfGEJm49SeXivO5WAyTZ6StsI=
Bytes: 3490
Ben Bacarisse <ben@bsb.me.uk> writes:
> Bart <bc@freeuk.com> writes:
>> BLISS is a rather strange language. For something supposedly low level than
>> C, it doesn't have 'goto'.
>>
>> It is also typeless.
>>
>> There is also a key feature that sets it apart from most HLLs: usually if
>> you declare a variable A, then you can access A's value just by writing A;
>> its address is automatically dereferenced.
>
> Not always. This is where left- and right-evaluation came in. On the
> left of an assignment A denotes a "place" to receive a value. On the
> right, it denotes a value obtained from a place. CPL used the terms and
> C got them via BCPL's documentation. Viewed like this, BLISS just makes
> "evaluation" a universal concept.
As I recall, the terms "lvalue" and "rvalue" originated with CPL. The
'l' and 'r' suggest the left and right sides of an assignment.
Disclaimer: I have a couple of CPL documents, and I don't see the terms
"lvalue" and "rvalue" in a quick look. The PDFs are not searchable. If
someone has better information, please post it. Wikipedia does say that
the notion of "l-values" and "r-values" was introduced by CPL.
An expression could be "evaluated for its lvalue", which means
determining what object it designates, or "evaluted for its rvalue",
which C just calls evaluating the expression. An expression like 2+2
that does not designate an object does not have an lvalue.
So given `int foo = 42;`, in CPL terms evaluating `foo` for its lvalue
yields the identity of that object, and evaluating `foo` for its rvalue
yields the value 42.
C changed the meanings, so that a C lvalue is a kind of expression, not
the result of evaluating an expression. C doesn't use the term "rvalue"
except in one footnote: "What is sometimes called "rvalue" is in this
document described as the "value of an expression"."
C has implicit *lvalue conversion* which converts an lvalue (expression)
to the value stored in the designated object. Apparently BLISS requires
this conversion to be done explicitly. (I don't hate the idea.)
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */