Changeset 29c9b23 for doc/theses/andrew_beach_MMath/existing.tex
- Timestamp:
- Feb 4, 2021, 9:56:11 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 9af0fe2d
- Parents:
- 6a99803
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/existing.tex
r6a99803 r29c9b23 1 \chapter{\ texorpdfstring{\CFA Existing Features}{Cforall Existing Features}}1 \chapter{\CFA Existing Features} 2 2 3 3 \CFA (C-for-all)~\cite{Cforall} is an open-source project extending ISO C with … … 43 43 44 44 \section{Reference Type} 45 \CFA adds a rebindable reference type to C, but more expressive than the \C C45 \CFA adds a rebindable reference type to C, but more expressive than the \Cpp 46 46 reference. Multi-level references are allowed and act like auto-dereferenced 47 47 pointers using the ampersand (@&@) instead of the pointer asterisk (@*@). \CFA … … 60 60 61 61 Both constructors and destructors are operators, which means they are just 62 functions with special operator names rather than type names in \C C. The62 functions with special operator names rather than type names in \Cpp. The 63 63 special operator names may be used to call the functions explicitly (not 64 allowed in \C Cfor constructors).64 allowed in \Cpp for constructors). 65 65 66 66 In general, operator names in \CFA are constructed by bracketing an operator … … 89 89 matching overloaded destructor @void ^?{}(T &);@ is called. Without explicit 90 90 definition, \CFA creates a default and copy constructor, destructor and 91 assignment (like \C C). It is possible to define constructors/destructors for91 assignment (like \Cpp). It is possible to define constructors/destructors for 92 92 basic and existing types. 93 93 … … 95 95 \CFA uses parametric polymorphism to create functions and types that are 96 96 defined over multiple types. \CFA polymorphic declarations serve the same role 97 as \C Ctemplates or Java generics. The ``parametric'' means the polymorphism is97 as \Cpp templates or Java generics. The ``parametric'' means the polymorphism is 98 98 accomplished by passing argument operations to associate \emph{parameters} at 99 99 the call site, and these parameters are used in the function to differentiate … … 135 135 136 136 Note, a function named @do_once@ is not required in the scope of @do_twice@ to 137 compile it, unlike \C Ctemplate expansion. Furthermore, call-site inferencing137 compile it, unlike \Cpp template expansion. Furthermore, call-site inferencing 138 138 allows local replacement of the most specific parametric functions needs for a 139 139 call. … … 179 179 } 180 180 \end{cfa} 181 The generic type @node(T)@ is an example of a polymorphic-type usage. Like \C C181 The generic type @node(T)@ is an example of a polymorphic-type usage. Like \Cpp 182 182 templates usage, a polymorphic-type usage must specify a type parameter. 183 183
Note: See TracChangeset
for help on using the changeset viewer.