-1

I have always thought that l and r in lvalue and rvalue stand for "left" and "right". However, today, my teacher enlightened me that r is "reference", which startled me. As a result, I'm confused now because I have no idea what l in lvalue is.

Tki Lio
  • 263
  • 1
  • 8
  • This is related to: https://stackoverflow.com/questions/3601602/what-are-rvalues-lvalues-xvalues-glvalues-and-prvalues – M. Sol Sep 04 '18 at 10:09
  • 2
    "left" and "right" were the original meaning coined by K&R. (This referred to left and right side of assignment.) In C++, this has shifted slightly as things got much more complicated... ;-) – Scheff's Cat Sep 04 '18 at 10:09
  • 2
    hmm r in `rvalue` is not `reference` otherwise `rvalue reference` would be tautology – Ivaylo Strandjev Sep 04 '18 at 10:09
  • Just found out about lvalue and rvalue: _They were introduced by Christopher Strachey for CPL [Strachey,196?], the ancestor to BCPL. Dennis Ritchie used “lvalue” to describe C (e.g. see [K&R,1978]), but left out “rvalue”, considering “lvalue” and “not lvalue” sufficient._ in [www.stroustrup.com/terminology.pdf](http://www.stroustrup.com/terminology.pdf). (So, I was wrong with "coined by K&R" (completely).) – Scheff's Cat Sep 04 '18 at 10:18
  • 1
    _However, today, my teacher enlightened me that r is "reference"_ Yeah, it's not enlightenment if they're wrong, and the 'r' does not stand for 'reference'. – Useless Sep 04 '18 at 10:27

1 Answers1

0

Old standards point towards them simply called being left and right values (of an assignment).

In C, L values were named "Locator values" as they point to a memory address.

Prodigle
  • 1,757
  • 12
  • 23