Ignore:
Timestamp:
Feb 12, 2021, 12:27:38 PM (9 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
eb24cec0
Parents:
da3963a (diff), 52f6250 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/existing.tex

    rda3963a r565acf59  
    1 \chapter{\texorpdfstring{\CFA Existing Features}{Cforall Existing Features}}
     1\chapter{\CFA Existing Features}
    22
    33\CFA (C-for-all)~\cite{Cforall} is an open-source project extending ISO C with
     
    1212obvious to the reader.
    1313
    14 \section{\texorpdfstring{Overloading and \lstinline|extern|}{Overloading and extern}}
     14\section{Overloading and \lstinline{extern}}
    1515\CFA has extensive overloading, allowing multiple definitions of the same name
    1616to be defined.~\cite{Moss18}
     
    4242
    4343\section{Reference Type}
    44 \CFA adds a rebindable reference type to C, but more expressive than the \CC
     44\CFA adds a rebindable reference type to C, but more expressive than the \Cpp
    4545reference.  Multi-level references are allowed and act like auto-dereferenced
    4646pointers using the ampersand (@&@) instead of the pointer asterisk (@*@). \CFA
     
    5959
    6060Both constructors and destructors are operators, which means they are just
    61 functions with special operator names rather than type names in \CC. The
     61functions with special operator names rather than type names in \Cpp. The
    6262special operator names may be used to call the functions explicitly (not
    63 allowed in \CC for constructors).
     63allowed in \Cpp for constructors).
    6464
    6565In general, operator names in \CFA are constructed by bracketing an operator
     
    8888matching overloaded destructor @void ^?{}(T &);@ is called.  Without explicit
    8989definition, \CFA creates a default and copy constructor, destructor and
    90 assignment (like \CC). It is possible to define constructors/destructors for
     90assignment (like \Cpp). It is possible to define constructors/destructors for
    9191basic and existing types.
    9292
     
    9494\CFA uses parametric polymorphism to create functions and types that are
    9595defined over multiple types. \CFA polymorphic declarations serve the same role
    96 as \CC templates or Java generics. The ``parametric'' means the polymorphism is
     96as \Cpp templates or Java generics. The ``parametric'' means the polymorphism is
    9797accomplished by passing argument operations to associate \emph{parameters} at
    9898the call site, and these parameters are used in the function to differentiate
     
    134134
    135135Note, a function named @do_once@ is not required in the scope of @do_twice@ to
    136 compile it, unlike \CC template expansion. Furthermore, call-site inferencing
     136compile it, unlike \Cpp template expansion. Furthermore, call-site inferencing
    137137allows local replacement of the most specific parametric functions needs for a
    138138call.
     
    178178}
    179179\end{cfa}
    180 The generic type @node(T)@ is an example of a polymorphic-type usage.  Like \CC
     180The generic type @node(T)@ is an example of a polymorphic-type usage.  Like \Cpp
    181181templates usage, a polymorphic-type usage must specify a type parameter.
    182182
Note: See TracChangeset for help on using the changeset viewer.