Changeset 8f5bf6d

Apr 5, 2017, 9:38:31 AM (7 years ago)
Peter A. Buhr <pabuhr@…>
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
0a4c59b, a95310e3
4fc45ff (diff), 55b2f5a (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.

Merge branch 'master' of plg2:software/cfa/cfa-cc

10 added
2 edited


  • doc/bibliography/cfa.bib

    r4fc45ff r8f5bf6d  
    30573057    pages       = {147-148},
    30583058    note        = {Reprinted in \cite{Yourdon79} pp. 29--36.},
     3062    keywords = {GObject},
     3063    contributor = {},
     3064    author = {{The GNOME Project}},
     3065    title = {{GObject} Reference Manual},
     3066    year = 2014,
     3067    url = {},
     3068    urldate = {2017-04-04}
     4566    keywords = {objective-c},
     4567    contributor = {},
     4568    author = {{Apple Computer Inc.}},
     4569    title = {The {Objective-C} Programming Language},
     4570    year = 2002
     4574    keywords = {objective-c},
     4575    contributor = {},
     4576    author = {{Apple Computer Inc.}},
     4577    title = {{Xcode} 7 Release Notes},
     4578    year = 2015,
     4579    url = {},
     4580    urldate = {2017-04-04}
    45564584    keywords    = {Beta, object oriented, concurrency, exceptions},
     6901    keywords = {GObject, Vala},
     6902    contributor = {},
     6903    author = {{The GNOME Project}},
     6904    title = {Vala Reference Manual},
     6905    year = 2017,
     6906    url = {},
     6907    urldate = {2017-04-04}
    68736911    author      = {Gene M. Amdahl},
  • doc/generic_types/generic_types.tex

    r4fc45ff r8f5bf6d  
    860860Cyclone also provides capabilities for polymorphic functions and existential types~\citep{Grossman06}, similar in concept to \CFA's @forall@ functions and generic types. Cyclone existential types can include function pointers in a construct similar to a virtual function table, but these pointers must be explicitly initialized at some point in the code, a tedious and potentially error-prone process. Furthermore, Cyclone's polymorphic functions and types are restricted in that they may only abstract over types with the same layout and calling convention as @void*@, in practice only pointer types and @int@ - in \CFA terms, all Cyclone polymorphism must be dtype-static. This design provides the efficiency benefits discussed in Section~\ref{sec:generic-apps} for dtype-static polymorphism, but is more restrictive than \CFA's more general model.
    862 \TODO{Talk about GObject, other object-oriented frameworks for C (Objective-C)?}
     862Apple's Objective-C \citep{obj-c-book} is another industrially successful set of extensions to C. The Objective-C language model is a fairly radical departure from C, adding object-orientation and message-passing. Objective-C implements variadic functions using the C @va_arg@ mechanism, and did not support type-checked generics until recently \citep{xcode7}, historically using less-efficient and more error-prone runtime checking of object types instead. The GObject framework \citep{GObject} also adds object-orientation with runtime type-checking and reference-counting garbage-collection to C; these are much more intrusive feature additions than those provided by \CFA, in addition to the runtime overhead of reference-counting. The Vala programming language \citep{Vala} compiles to GObject-based C, and so adds the burden of learning a separate language syntax to the aforementioned demerits of GObject as a modernization path for existing C code-bases.
    864864Go \citep{Go} and Rust \citep{Rust} are both modern, compiled languages with abstraction features similar to \CFA traits, \emph{interfaces} in Go and \emph{traits} in Rust. However, both languages represent dramatic departures from C in terms of language model, and neither has the same level of compatibility with C as \CFA. Go is a garbage-collected language, imposing the associated runtime overhead, and complicating foreign-function calls with the necessity of accounting for data transfer between the managed Go runtime and the unmanaged C runtime. Furthermore, while generic types and functions are available in Go, they are limited to a small fixed set provided by the compiler, with no language facility to define more. Rust is not garbage-collected, and thus has a lighter-weight runtime that is more easily interoperable with C. It also possesses much more powerful abstraction capabilities for writing generic code than Go. On the other hand, Rust's borrow-checker, while it does provide strong safety guarantees, is complex and difficult to learn, and imposes a distinctly idiomatic programming style on Rust. \CFA, with its more modest safety features, is significantly easier to port C code to, while maintaining the idiomatic style of the original source.
Note: See TracChangeset for help on using the changeset viewer.