Changeset 8f16086 for doc/generic_types
- Timestamp:
- May 9, 2017, 7:40:29 AM (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:
- 6ac2ada
- Parents:
- f408e1a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/generic_types.tex
rf408e1a r8f16086 1020 1020 While \CC provides good backwards compatibility with C, it has a steep learning curve for many of its extensions. 1021 1021 For example, polymorphism is provided via three disjoint mechanisms: overloading, inheritance, and templates. 1022 The overloading is restricted because resolution does not us ingthe return type, inheritance requires learning object-oriented programming and coping with a restricted nominal-inheritance hierarchy, templates cannot be separately compiled resulting in compilation/code bloat and poor error messages, and determining how these mechanisms interact and which to use is confusing.1022 The overloading is restricted because resolution does not use the return type, inheritance requires learning object-oriented programming and coping with a restricted nominal-inheritance hierarchy, templates cannot be separately compiled resulting in compilation/code bloat and poor error messages, and determining how these mechanisms interact and which to use is confusing. 1023 1023 In contrast, \CFA has a single facility for polymorphic code supporting type-safe separate-compilation of polymorphic functions and generic (opaque) types, which uniformly leverage the C procedural paradigm. 1024 1024 The key mechanism to support separate compilation is \CFA's \emph{explicit} use of assumed properties for a type.
Note: See TracChangeset
for help on using the changeset viewer.