Changeset b041f11 for doc/theses/andrew_beach_MMath/features.tex
- Timestamp:
- Aug 30, 2021, 9:43:40 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- 13afd0c
- Parents:
- f93d7fc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/features.tex
rf93d7fc rb041f11 152 152 % A type's descendants are its children and its children's descendants. 153 153 154 For the purposes of ill ustration, a proposed -- but unimplemented syntax --155 will be used. Each virtual type is rep resented by a trait with an annotation154 For the purposes of illistration, a proposed -- but unimplemented syntax -- 155 will be used. Each virtual type is repersented by a trait with an annotation 156 156 that makes it a virtual type. This annotation is empty for a root type, which 157 157 creates a new tree: … … 192 192 As @child_type@ is a child of @root_type@ it has the virtual members of 193 193 @root_type@ (@to_string@ and @size@) as well as the one it declared 194 (@irrel evant_function@).194 (@irrelivant_function@). 195 195 196 196 It is important to note that these are virtual members, and may contain … … 282 282 283 283 Fields are filled in the same way as a structure as well. However an extra 284 field is added thatcontains the pointer to the virtual table.285 It must be explicitly initiali zed by the user when the exception is284 field is added, this field contains the pointer to the virtual table. 285 It must be explicitly initialised by the user when the exception is 286 286 constructed. 287 287 … … 310 310 311 311 %\subsection{Exception Details} 312 This is the only interface needed when raising and handling exceptions. 313 However it is actually a short hand for a more complex312 If one is only raising and handling exceptions, that is the only interface 313 that is needed. However it is actually a short hand for a more complex 314 314 trait based interface. 315 315 316 The language views exceptions through a series of traits .317 If a type satisfies them, then it can be used as an exception. The following316 The language views exceptions through a series of traits, 317 if a type satisfies them, then it can be used as an exception. The following 318 318 is the base trait all exceptions need to match. 319 319 \begin{cfa} … … 322 322 }; 323 323 \end{cfa} 324 The trait is defined over two types :the exception type and the virtual table324 The trait is defined over two types, the exception type and the virtual table 325 325 type. Each exception type should have a single virtual table type. 326 326 There are no actual assertions in this trait because the trait system … … 347 347 }; 348 348 \end{cfa} 349 Both traits ensure a pair of types isan exception type, its virtual table349 Both traits ensure a pair of types are an exception type, its virtual table 350 350 type 351 351 and defines one of the two default handlers. The default handlers are used … … 393 393 394 394 The differences between the two operations include how propagation is 395 performed, where ex ecution after an exception is handler395 performed, where excecution after an exception is handler 396 396 and which default handler is run. 397 397
Note: See TracChangeset
for help on using the changeset viewer.