Re: print/x on references

Paul Hilfinger
2007-10-18T19:10:57Z

> > > To find the address of the pointer to the object I was thinking "p
> > > &(&x)"...

> > That is such a horrible abuse of C++ that I didn't even think to try
> > it....
>
> I think the expression evaluator should work as the language does (as
> much as possible). And once it does that then thought is given to
> whatever extensions are needed to accomplish things not possible with
> the language syntax.
> e.g. "p cut-n-pasted-expression-from-source" should "just work" (to
> some reasonable extent).

Or, to put it rhetorically, it is fitting that &(&x) (for x of type
Glorp&) is a horrible abuse of C++, since in C++ the type Glorp&* does
not exist!

PNH