[PRL] values and expressions

Richard Cobbe cobbe at ccs.neu.edu
Sun Oct 23 09:27:33 EDT 2005


On Sun, Oct 23, 2005 at 12:29:43AM -0400, Carl Eastlund wrote:
> Correction: of course I have.  "(int *)0xdeadbeef" is a "reference" in
> C/C++.  But I think this only goes to show the value of _not_
> including these things as expressions.
>
> On 10/23/05, Carl Eastlund <carl.eastlund at gmail.com> wrote:
> > I'd have to say no, think of any language where values include
> > references.  I've never seen a language that included them in
> > expressions.

But aren't you confusing values with (syntactic) literals?

I'm a little fuzzy on the exact details, so I may be completely off
here.  But I'm pretty sure I've seen some treatments of C that have two
different kinds of values, lvalues and rvalues.  In that framework, it's
possible that "x" *is* a value in the statement

    x = 3;

assuming proper variable declarations, of course.

Richard



More information about the PRL mailing list