Changes in / [f8a7fed:3bd5ca7]
- File:
-
- 1 edited
-
doc/theses/andrew_beach_MMath/features.tex (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/features.tex
rf8a7fed r3bd5ca7 147 147 as a hidden field. 148 148 149 Up until this point the virtual system is a lot like ones found in object- 150 orientated languages but this where they diverge. Objects encapsulate a 151 single set of behaviours in each type, universally across the entire program, 152 and indeed all programs that use that type definition. In this sense the 153 types are ``closed" and cannot be altered. 154 155 However in \CFA types do not encapsulate any behaviour. Traits are local and 156 types can begin to statify a trait, stop satifying a trait or satify the same 157 trait in a different way with each new definition. In this sense they are 158 ``open" as they can change at any time. This means it is implossible to pick 159 a single set of functions that repersent the type. 160 161 So we don't try to have a single value. The user can define virtual tables 162 which are filled in at their declaration and given a name. Anywhere you can 163 see that name you can use that virtual table; even if it is defined locally 164 inside a function, although in that case you must respect its lifetime. 165 166 An object of a virtual type is ``bound" to a virtual table instance which 167 sets the virtual members for that object. The virtual members can be accessed 168 through the object. 149 \todo{Open/Closed types and how that affects the virtual design.} 169 150 170 151 While much of the virtual infrastructure is created, it is currently only used
Note:
See TracChangeset
for help on using the changeset viewer.