# Changeset 7d94d805

Ignore:
Timestamp:
Feb 6, 2018, 3:33:27 PM (5 years ago)
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
2b8bc41, 86c934a
Parents:
69ce455
Message:

First draft of references section in paper

File:
1 edited

### Legend:

Unmodified
 r69ce455 This initialization of references from lvalues rather than pointers can be considered a lvalue-to-reference'' conversion rather than an elision of the address-of operator; similarly, use of a the value pointed to by a reference in an rvalue context can be thought of as a reference-to-rvalue'' conversion. \CFA includes one more reference conversion, an rvalue-to-reference'' conversion. \TODO{finish reference conversions; look at user manual} \CFA includes one more reference conversion, an rvalue-to-reference'' conversion, implemented by means of an implicit temporary. When an rvalue is used to initialize a reference, it is instead used to initialize a hidden temporary value with the same lexical scope as the reference, and the reference is initialized to the address of this temporary. This allows complex values to be succinctly and efficiently passed to functions, without the syntactic overhead of explicit definition of a temporary variable or the runtime cost of pass-by-value. \CC allows a similar binding, but only for @const@ references; the more general semantics of \CFA are an attempt to avoid the \emph{const hell} problem, in which addition of a @const@ qualifier to one reference requires a cascading chain of added qualifiers. \subsection{Constructors and Destructors}