# Changeset 3dafd83

Ignore:
Timestamp:
May 15, 2017, 6:40:53 PM (5 years ago)
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
9ebd778
Parents:
e2f1eeb
Message:

update intro sections, I/O, standard headers, keywords, syntactic anomalies, constants

File:
1 edited

### Legend:

Unmodified
 re2f1eeb %% Created On       : Wed Apr  6 14:53:29 2016 %% Last Modified By : Peter A. Buhr %% Last Modified On : Tue Apr 18 17:17:24 2017 %% Update Count     : 1430 %% Last Modified On : Mon May 15 18:29:58 2017 %% Update Count     : 1598 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{calc} \usepackage{xspace} \usepackage{graphicx} \usepackage{varioref}                                                                   % extended references \usepackage{listings}                                                                   % format program code \section{Introduction} \CFA\footnote{Pronounced C-for-all'', and written \CFA, CFA, or \CFL.} is a modern general-purpose programming-language, designed as an evolutionary step forward from the C programming language. \CFA{}\index{cforall@\CFA}\footnote{Pronounced \Index*{C-for-all}'', and written \CFA, CFA, or \CFL.} is a modern general-purpose programming-language, designed as an evolutionary step forward for the C programming language. The syntax of the \CFA language builds from C, and should look immediately familiar to C/\Index*[C++]{\CC} programmers. % Any language feature that is not described here can be assumed to be using the standard C11 syntax. \CFA adds many modern programming-language features that directly lead to increased \emph{safety} and \emph{productivity}, while maintaining interoperability with existing C programs and achieving C performance. Like C, \CFA is a statically typed, procedural language with a low-overhead runtime, meaning there is no global garbage-collection. \CFA adds many modern programming-language features that directly lead to increased \emph{\Index{safety}} and \emph{\Index{productivity}}, while maintaining interoperability with existing C programs and achieving C performance. Like C, \CFA is a statically typed, procedural language with a low-overhead runtime, meaning there is no global \Index{garbage-collection}, but \Index{regional garbage-collection}\index{garbage collection!regional} is possible. The primary new features include parametric-polymorphic routines and types, exceptions, concurrency, and modules. instead, a programmer evolves an existing C program into \CFA by incrementally incorporating \CFA features. New programs can be written in \CFA using a combination of C and \CFA features. \Index*[C++]{\CC} had a similar goal 30 years ago, but has struggled over the intervening time to incorporate modern programming-language features because of early design choices. \CFA has 30 years of hindsight and a clean starting point. \Index*[C++]{\CC} had a similar goal 30 years ago, but currently has the disadvantages of multiple legacy design-choices that cannot be updated and active divergence of the language model from C, requiring significant effort and training to incrementally add \CC to a C-based project. In contrast, \CFA has 30 years of hindsight and a clean starting point. Like \Index*[C++]{\CC}, there may be both an old and new ways to achieve the same effect. For example, the following programs compare the \CFA and C I/O mechanisms. \begin{quote2} \begin{tabular}{@{}l@{\hspace{3em}}l@{}} \multicolumn{1}{c@{\hspace{3em}}}{\textbf{\CFA}}        & \multicolumn{1}{c}{\textbf{C}}        \\ \begin{tabular}{@{}l@{\hspace{1.5em}}l@{\hspace{1.5em}}l@{}} \multicolumn{1}{c@{\hspace{1.5em}}}{\textbf{\CFA}}      & \multicolumn{1}{c}{\textbf{C}}        & \multicolumn{1}{c}{\textbf{\CC}}      \\ \begin{cfa} #include int main( void ) { int x = 0, y = 1, z = 2; \begin{lstlisting} #include int main( void ) { int x = 0, y = 1, z = 2; } \end{lstlisting} & \begin{lstlisting} #include using namespace std; int main() { int x = 0, y = 1, z = 2; ®cout<