Ignore:
Timestamp:
Mar 9, 2018, 1:33:19 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
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:
e84382b
Parents:
f86c8e5
Message:

Some line edits for brevity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/Paper.tex

    rf86c8e5 rb51e5fdb  
    592592[ q, r ] = div( 13.5, 5.2 );                            $\C{// assign into tuple}$
    593593\end{cfa}
    594 Clearly, this approach is straightforward to understand and use;
     594This approach is straightforward to understand and use;
    595595therefore, why do few programming languages support this obvious feature or provide it awkwardly?
    596 The answer is that there are complex consequences that cascade through multiple aspects of the language, especially the type-system.
     596To answer, there are complex consequences that cascade through multiple aspects of the language, especially the type-system.
    597597This section show these consequences and how \CFA handles them.
    598598
     
    813813where @[5, "hello"]@ is flattened, giving argument list @5, "hello"@, and @T@ binds to @int@ and @U@ binds to @const char@.
    814814Tuples, however, may contain polymorphic components.
    815 For example, a plus operator can be written to add two triples together.
     815For example, a plus operator can be written to sum two triples.
    816816\begin{cfa}
    817817forall( otype T | { T ?+?( T, T ); } ) [T, T, T] ?+?( [T, T, T] x, [T, T, T] y ) {
     
    847847As such, @ttype@ variables are also called \newterm{argument packs}.
    848848
    849 Like variadic templates, the main way to manipulate @ttype@ polymorphic functions is via recursion.
     849Like variadic templates, @ttype@ polymorphic functions are primarily manipulated via recursion.
    850850Since nothing is known about a parameter pack by default, assertion parameters are key to doing anything meaningful.
    851851Unlike variadic templates, @ttype@ polymorphic functions can be separately compiled.
    852 For example, a generalized @sum@ function written using @ttype@:
     852For example, a generalized @sum@ function:
    853853\begin{cfa}
    854854int sum$\(_0\)$() { return 0; }
     
    26482648We justify the given line count by noting that many object-oriented languages do not allow implementing new interfaces on library types without subclassing or wrapper types, which may be similarly verbose.
    26492649
    2650 Raw line-count, however, is a fairly rough measure of code complexity;
    2651 another important factor is how much type information the programmer must manually specify, especially where that information is not checked by the compiler.
     2650Line-count is a fairly rough measure of code complexity;
     2651another important factor is how much type information the programmer must specify manually, especially where that information is not compiler-checked.
    26522652Such unchecked type information produces a heavier documentation burden and increased potential for runtime bugs, and is much less common in \CFA than C, with its manually specified function pointer arguments and format codes, or \CCV, with its extensive use of untype-checked downcasts, \eg @object@ to @integer@ when popping a stack.
    26532653To quantify this manual typing, the ``redundant type annotations'' line in Table~\ref{tab:eval} counts the number of lines on which the type of a known variable is respecified, either as a format specifier, explicit downcast, type-specific function, or by name in a @sizeof@, struct literal, or @new@ expression.
     
    27662766Finally, we demonstrate that \CFA performance for some idiomatic cases is better than C and close to \CC, showing the design is practically applicable.
    27672767
    2768 There is ongoing work on a wide range of \CFA feature extensions, including arrays with size, runtime type-information, virtual functions, user-defined conversions, concurrent primitives, and modules.
    2769 (While all examples in the paper compile and run, a public beta-release of \CFA will take another 8--12 months to finalize these additional extensions.)
    2770 In addition, there are interesting future directions for the polymorphism design.
     2768There is ongoing work on a wide range of \CFA features, including arrays with size, runtime type-information, virtual functions, user-defined conversions, concurrent primitives, and modules.
     2769While all examples in the paper compile and run, a public beta-release of \CFA will take another 8--12 months to finalize these extensions.
     2770There are also interesting future directions for the polymorphism design.
    27712771Notably, \CC template functions trade compile time and code bloat for optimal runtime of individual instantiations of polymorphic functions.
    27722772\CFA polymorphic functions use dynamic virtual-dispatch;
Note: See TracChangeset for help on using the changeset viewer.