Changeset 8f5bf6d


Ignore:
Timestamp:
Apr 5, 2017, 9:38:31 AM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
0a4c59b, a95310e3
Parents:
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.
Message:

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

Location:
doc
Files:
10 added
2 edited

Legend:

Unmodified
Added
Removed
  • doc/bibliography/cfa.bib

    r4fc45ff r8f5bf6d  
    30573057    pages       = {147-148},
    30583058    note        = {Reprinted in \cite{Yourdon79} pp. 29--36.},
     3059}
     3060
     3061@online{GObject,
     3062    keywords = {GObject},
     3063    contributor = {a3moss@uwaterloo.ca},
     3064    author = {{The GNOME Project}},
     3065    title = {{GObject} Reference Manual},
     3066    year = 2014,
     3067    url = {https://developer.gnome.org/gobject/stable/},
     3068    urldate = {2017-04-04}
    30593069}
    30603070
     
    45534563}
    45544564
     4565@book{obj-c-book,
     4566    keywords = {objective-c},
     4567    contributor = {a3moss@uwaterloo.ca},
     4568    author = {{Apple Computer Inc.}},
     4569    title = {The {Objective-C} Programming Language},
     4570    year = 2002
     4571}
     4572
     4573@online{xcode7,
     4574    keywords = {objective-c},
     4575    contributor = {a3moss@uwaterloo.ca},
     4576    author = {{Apple Computer Inc.}},
     4577    title = {{Xcode} 7 Release Notes},
     4578    year = 2015,
     4579    url = {https://developer.apple.com/library/content/documentation/Xcode/Conceptual/RN-Xcode-Archive/Chapters/xc7_release_notes.html},
     4580    urldate = {2017-04-04}
     4581}
     4582
    45554583@book{Beta,
    45564584    keywords    = {Beta, object oriented, concurrency, exceptions},
     
    68706898}
    68716899
     6900@online{Vala,
     6901    keywords = {GObject, Vala},
     6902    contributor = {a3moss@uwaterloo.ca},
     6903    author = {{The GNOME Project}},
     6904    title = {Vala Reference Manual},
     6905    year = 2017,
     6906    url = {https://wiki.gnome.org/Projects/Vala/Manual},
     6907    urldate = {2017-04-04}
     6908}
     6909
    68726910@inproceedings{Amdahl67,
    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.
    861861
    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.
    863863
    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.