Ignore:
Timestamp:
Mar 31, 2021, 2:18:19 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
198e335
Parents:
c60ef639
Message:

Andrew MMath: Added notes about checked exceptions to future work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/future.tex

    rc60ef639 r826ee62  
    8383patterns to find the handler.
    8484
     85\section{Checked Exceptions}
     86Checked exceptions make exceptions part of a function's type by adding the
     87exception signature. An exception signature must declare all checked
     88exceptions that could propogate from the function (either because they were
     89raised inside the function or came from a sub-function). This improves safety
     90by making sure every checked exception is either handled or consciously
     91passed on.
     92
     93However checked exceptions were never seriously considered for this project
     94for two reasons. The first is due to time constraints, even copying an
     95existing checked exception system would be pushing the remaining time and
     96trying to address the second problem would take even longer. The second
     97problem is that checked exceptions have some real usability trade-offs in
     98exchange for the increased safety.
     99
     100These trade-offs are most problematic when trying to pass exceptions through
     101higher-order functions from the functions the user passed into the
     102higher-order function. There are no well known solutions to this problem
     103that were statifactory for \CFA (which carries some of C's flexability
     104over safety design) so one would have to be researched and developed.
     105
     106Follow-up work might add checked exceptions to \CFA, possibly using
     107polymorphic exception signatures, a form of tunneling\cite{Zhang19} or
     108checked and unchecked raises.
     109
    85110\section{Zero-Cost Try}
    86111\CFA does not have zero-cost try-statements because the compiler generates C
Note: See TracChangeset for help on using the changeset viewer.