Changeset 55b2f5a
- Timestamp:
- Apr 4, 2017, 10:26:27 PM (8 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:
- 8f5bf6d
- Parents:
- 309be81
- Location:
- doc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/bibliography/cfa.bib
r309be81 r55b2f5a 3057 3057 pages = {147-148}, 3058 3058 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} 3059 3069 } 3060 3070 … … 4553 4563 } 4554 4564 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 4555 4583 @book{Beta, 4556 4584 keywords = {Beta, object oriented, concurrency, exceptions}, … … 6861 6889 } 6862 6890 6891 @online{Vala, 6892 keywords = {GObject, Vala}, 6893 contributor = {a3moss@uwaterloo.ca}, 6894 author = {{The GNOME Project}}, 6895 title = {Vala Reference Manual}, 6896 year = 2017, 6897 url = {https://wiki.gnome.org/Projects/Vala/Manual}, 6898 urldate = {2017-04-04} 6899 } 6900 6863 6901 @inproceedings{Amdahl67, 6864 6902 author = {Gene M. Amdahl}, -
doc/generic_types/generic_types.tex
r309be81 r55b2f5a 859 859 Cyclone 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. 860 860 861 \TODO{Talk about GObject, other object-oriented frameworks for C (Objective-C)?} 861 Apple'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. 862 862 863 863 Go \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.