Changeset 3bd1eb4 for doc/generic_types/generic_types.tex
- Timestamp:
- May 15, 2017, 3:27:47 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, 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:
- db0fa7c
- Parents:
- dbfb35d (diff), 9ff8310 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/generic_types.tex
rdbfb35d r3bd1eb4 6 6 \usepackage{upquote} % switch curled `'" to straight 7 7 \usepackage{listings} % format program code 8 \usepackage{rotating} 8 9 \usepackage[usenames]{color} 9 10 … … 48 49 49 50 % Useful macros 50 \newcommand{\CFA}{C$\mathbf\forall$\xspace} % Cforall symbolic name 51 \newcommand{\CFA}{C\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}\hspace{-1pt}\xspace} % Cforall symbolic name 52 %\newcommand{\CFA}{C$\mathbf\forall$\xspace} % Cforall symbolic name 51 53 \newcommand{\CC}{\rm C\kern-.1em\hbox{+\kern-.25em+}\xspace} % C++ symbolic name 52 54 \newcommand{\CCeleven}{\rm C\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name … … 97 99 \acmJournal{PACMPL} 98 100 99 \title{Generic and Tuple Types with Efficient Dynamic Layout in \ CFA}101 \title{Generic and Tuple Types with Efficient Dynamic Layout in \protect\CFA} 100 102 101 103 \author{Aaron Moss} … … 197 199 \label{sec:poly-fns} 198 200 199 \CFA 's polymorphism was originally formalized by \citet{Ditchfield92}, and first implemented by \citet{Bilson03}.201 \CFA{}\hspace{1pt}'s polymorphism was originally formalized by \citet{Ditchfield92}, and first implemented by \citet{Bilson03}. 200 202 The signature feature of \CFA is parametric-polymorphic functions~\citep{forceone:impl,Cormack90,Duggan96} with functions generalized using a @forall@ clause (giving the language its name): 201 203 \begin{lstlisting} … … 950 952 } 951 953 \end{lstlisting} 952 \caption{\ CFA Benchmark Test}954 \caption{\protect\CFA Benchmark Test} 953 955 \label{fig:BenchmarkTest} 954 956 \end{figure} … … 1020 1022 While \CC provides good backwards compatibility with C, it has a steep learning curve for many of its extensions. 1021 1023 For example, polymorphism is provided via three disjoint mechanisms: overloading, inheritance, and templates. 1022 The overloading is restricted because resolution does not us ingthe return type, inheritance requires learning object-oriented programming and coping with a restricted nominal-inheritance hierarchy, templates cannot be separately compiled resulting in compilation/code bloat and poor error messages, and determining how these mechanisms interact and which to use is confusing.1024 The overloading is restricted because resolution does not use the return type, inheritance requires learning object-oriented programming and coping with a restricted nominal-inheritance hierarchy, templates cannot be separately compiled resulting in compilation/code bloat and poor error messages, and determining how these mechanisms interact and which to use is confusing. 1023 1025 In contrast, \CFA has a single facility for polymorphic code supporting type-safe separate-compilation of polymorphic functions and generic (opaque) types, which uniformly leverage the C procedural paradigm. 1024 1026 The key mechanism to support separate compilation is \CFA's \emph{explicit} use of assumed properties for a type.
Note: See TracChangeset
for help on using the changeset viewer.