Ignore:
Timestamp:
Aug 8, 2024, 10:02:34 PM (2 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
7568e5c
Parents:
11cced6
git-author:
Peter A. Buhr <pabuhr@…> (08/08/24 22:01:56)
git-committer:
Peter A. Buhr <pabuhr@…> (08/08/24 22:02:34)
Message:

last proofread of thesis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/jiada_liang_MMath/conclusion.tex

    r11cced6 rc1c0efdb  
    1313Enumeration traits define the meaning of an enumeration, allowing functions to be written that work on any enumeration, such as the reading and printing an enumeration.
    1414Using advanced duck typing, existing C enumerations can be extended so they work with all of the enumeration features, providing for legacy C code to be moved forward into the modern \CFA programming domain.
    15 Finally, I expanded the \CFA project's test suite with multiple enumeration features tests with respect to implicit conversions, control structures, inheritance, interaction with the polymorphic types, and the features built on top of enumeration traits.
     15Finally, I expanded the \CFA project's test-suite with multiple enumeration features tests with respect to implicit conversions, control structures, inheritance, interaction with the polymorphic types, and the features built on top of enumeration traits.
    1616These tests ensure future \CFA work does not accidentally break the new enumeration system.
    1717
     
    2121\section{Future Work}
    2222
     23The following are ideas to improve and extend the work in this thesis.
     24\begin{enumerate}
     25\item
    2326There are still corner cases being found in the current \CFA enumeration implementation.
    24 Fixing some of these corner cases requires changes to the \CFA resolver or extensions to \CFA, like compile-time constant-expression evaluation.
     27Fixing some of these corner cases requires changes to the \CFA resolver or extensions to \CFA. %, like compile-time constant-expression evaluation.
    2528When these changes are made, it should be straightforward to update the \CFA enumeration implementation to work with them.
    26 
     29\item
    2730Currently, some aspects of the enumeration trait system require explicitly including the file @enum.hfa@, which can lead to problems.
    2831It should be possible to have this file included implicitly by updating the \CFA prelude.
    29 
     32\item
     33There are multiple \CFA features being developed i parallel with enumerations.
     34Two closely related features are iterator and namespace.
     35Enumerations may have to be modified to dovetail with these features.
     36For example, enumerating with range loops does not align with the current iterator design, so some changes will be necessary.
     37\item
    3038C already provides @const@-style aliasing using the \emph{unnamed} enumerator \see{\VRef{s:TypeName}}, even if the name @enum@ is misleading (@const@ would be better).
    3139Given the existence of this form, it is conceivable to extend it with types other than @int@.
     
    4250enum( wchar_t * ) { Jack = L"John" };
    4351\end{cfa}
    44 There are several new features have been proposed or are developing in parallel with enumerations.
    45 Two closely related features are iterator and namespace.
    46 
    47 Enumerating features, and range loops in particular, are currently implemented as loops unique to \CFA enumeration and do not align with the
    48 general iterator pattern. They can be adapted to the iterator interface when it comes to maturity.
    49 
    50 Currently, \CFA implements a namespace feature for enumerated types only. There is recently a proposal by Andrew to
    51 generalize the concept of namespace to other types. The enumeration scope will be revisited to follow the semantics
    52 with other types. Also to improve the granularity of scope control, we propose the following extension:
     52\item
     53Currently enumeration scoping is all or nothing.
     54In some cases, it might be useful to increase the scoping granularity to individual enumerators.
    5355\begin{cfa}
    5456enum E1 { @!@A, @^@B, C };
    5557enum E2 @!@ { @!@A, @^@B, C };
    5658\end{cfa}
    57 which provides a combination of scoped and unscoped enumerators.
     59Here, @'!'@ means the enumerator is scoped, and @'^'@ means the enumerator is unscoped.
    5860For @E1@, @A@ is scoped; @B@ and @C@ are unscoped.
    5961For @E2@, @A@, and @C@ are scoped; @B@ is unscoped.
    60 Finding a use case is important to justify completing this extension.
     62Finding a use case is important to justify this extension.
     63\item
     64An extension mentioned in \VRef{s:Ada} is using @typedef@ to create an enumerator alias.
     65\begin{cfa}
     66enum(int) RGB { @Red@, @Green@, Blue };
     67enum(int) Traffic_Light { @Red@, Yellow, @Green@ };
     68typedef RGB.Red OtherRed; // alias
     69\end{cfa}
     70\end{enumerate}
Note: See TracChangeset for help on using the changeset viewer.