digitalmars.D.learn - terminology: "l-value" & "r-value"
- spir (17/17) Jan 04 2011 Hello,
- Pelle (7/19) Jan 04 2011 rvalue is easier than value-not-bound-to-a-memory-address.
- Steven Schveighoffer (12/27) Jan 04 2011 lvalue stands for left value, rvalue stands for right value. They
- Manfred_Nowak (3/4) Jan 04 2011 arg, no! please replace "equation" by "assignExpression".
- Steven Schveighoffer (6/9) Jan 04 2011 please replace arg with argh!
- Manfred_Nowak (3/4) Jan 04 2011 done. :-)
- spir (8/11) Jan 04 2011 lol, great! this is one of the reasons why in my dream language, assignm...
Hello, I'm bluffed by the 2 terms "l-value" & "r-value" used in C-line language co= mmon terminologies. I think I guess what they mean, but I don't understand = the need for such absconse idioms. Why not: l-value <-> variable r-value <-> value (or expression) ? I guess (*p) is considered an l-value. Indeed, it's a special way of denoti= ng a variable, matching the special case of a pointer. If correct, this req= uires slightly extending the notion of variable (and/or of identifier). On the r-value side, I cannot find anything that makes it a distinct concep= t from the one of value, or of expression. Explanations welcome, thank you, Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.com
Jan 04 2011
On 01/04/2011 02:55 PM, spir wrote:Hello, I'm bluffed by the 2 terms "l-value"& "r-value" used in C-line language common terminologies. I think I guess what they mean, but I don't understand the need for such absconse idioms. Why not: l-value<-> variable r-value<-> value (or expression) ? I guess (*p) is considered an l-value. Indeed, it's a special way of denoting a variable, matching the special case of a pointer. If correct, this requires slightly extending the notion of variable (and/or of identifier). On the r-value side, I cannot find anything that makes it a distinct concept from the one of value, or of expression. Explanations welcome, thank you, Denis -- -- -- -- -- -- -- vit esse estrany ☣ spir.wikidot.comrvalue is easier than value-not-bound-to-a-memory-address. lvalue is easier than value-with-memory-address. Both lvalues and rvalues are values, both can be expressions, and lvalues doesn't have to be variables. Perhaps a better terminology could have been chosen, but changing them doesn't provide real benefits, as far as I can tell.
Jan 04 2011
On Tue, 04 Jan 2011 08:55:07 -0500, spir <denis.spir gmail.com> wrote:Hello, I'm bluffed by the 2 terms "l-value" & "r-value" used in C-line language common terminologies. I think I guess what they mean, but I don't understand the need for such absconse idioms. Why not: l-value <-> variable r-value <-> value (or expression) ? I guess (*p) is considered an l-value. Indeed, it's a special way of denoting a variable, matching the special case of a pointer. If correct, this requires slightly extending the notion of variable (and/or of identifier). On the r-value side, I cannot find anything that makes it a distinct concept from the one of value, or of expression. Explanations welcome, thank you, Denislvalue stands for left value, rvalue stands for right value. They describe which side of the equation they are on: lvalue = rvalue; Why these terms instead of something more natural? Well, I have no idea :) If I were to guess, it would be that no natural term could exactly describe the meaning, and also that using natural terms are subjective. There's no mistaking what lvalue and rvalue mean becausey they are defined by the language itself. I'm sure Walter probably knows the origin, l and r values are really compiler terms, and he's been writing compilers for a long time. -Steve
Jan 04 2011
Steven Schveighoffer wrote:They describe which side of the equation they are onarg, no! please replace "equation" by "assignExpression". -manfred
Jan 04 2011
On Tue, 04 Jan 2011 12:56:53 -0500, Manfred_Nowak <svv1999 hotmail.com> wrote:Steven Schveighoffer wrote:please replace arg with argh! ;) But whatever floats your boat. -SteveThey describe which side of the equation they are onarg, no! please replace "equation" by "assignExpression".
Jan 04 2011
Steven Schveighoffer wrote:please replacedone. :-) -manfred
Jan 04 2011
On Tue, 4 Jan 2011 17:56:53 +0000 (UTC) "Manfred_Nowak" <svv1999 hotmail.com> wrote:lol, great! this is one of the reasons why in my dream language, assignment= would be denoted by any other sign *but* "=3D". Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.comThey describe which side of the equation they are on =20=20 arg, no! please replace "equation" by "assignExpression".
Jan 04 2011