Changeset 98c77b2


Ignore:
Timestamp:
May 12, 2025, 4:15:25 PM (4 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
8fe7a85
Parents:
1e7e6f38
Message:

fixed paragraph in intro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/fangren_yu_MMath/intro.tex

    r1e7e6f38 r98c77b2  
    912912For software-engineering reasons, the set assertions would be refactored into a trait to allow alternative implementations, like a Java \lstinline[language=java]{interface}.
    913913
    914 In summation, the \CFA type system inherits \newterm{nominal typing} for concrete types from C, and adds \newterm{structural typing} for polymorphic types.
    915 Traits are used like interfaces in Java or abstract base-classes in \CC, but without the nominal inheritance relationships.
    916 Instead, each polymorphic function or generic type defines the structural type needed for its execution, which is fulfilled at each call site from the lexical environment, like Go~\cite{Go} or Rust~\cite{Rust} interfaces.
    917 Hence, new lexical scopes and nested functions are used extensively to create local subtypes, as in the @qsort@ example, without having to manage a nominal inheritance hierarchy.
     914In summation, the \CFA type system inherits \newterm{nominal typing} for concrete types from C;
     915however, without inheritance in \CFA, nominal typing cannot be extended to polymorphic subtyping.
     916Instead, \CFA adds \newterm{structural typing} and uses it to generate polymorphism.
     917Here, traits are like interfaces in Java or abstract base-classes in \CC, but without the nominal inheritance relationships.
     918Instead, each polymorphic function or generic type defines the structural requirements needed for its execution, which is fulfilled at each call site from the lexical environment, like Go~\cite{Go} or Rust~\cite{Rust} interfaces.
     919Hence, lexical scopes and nested functions are used extensively to mimic subtypes, as in the @qsort@ example, without managing a nominal inheritance hierarchy.
    918920
    919921
Note: See TracChangeset for help on using the changeset viewer.