Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/proposals/vtable.md

    rfbfd97bd r0f740d6  
    237237default is provided or not, the second syntax can be used to pick a
    238238parameter on instantiation.
    239 
    240 ### Extension: Object Access
    241 This requires that the resolution scope (see below) is at the type level or
    242 has explicate points with names. These are the tables and table names used
    243 here.
    244 
    245 The system already knows where to find the virtual table and the object. If
    246 the tables have particular identities, or on the user side names, then it is
    247 meaningful to check if a binding virtual table is the same* as another. The
    248 main use of this is virtual table declarations also give the type they bind
    249 and if a binding table matches a known table then the underlyind object in the
    250 trait object must be of that type.
    251 
    252 * By identity, by value would work and in some senses be more flexiable. But
    253   it would be slower and refering to further away functions would be harder.
    254 
    255 This gives one of the main new features of the hierarchical use of virtual
    256 tables (see below); the ability to recover the underlying object. Or a pointer
    257 of the approprate type it which both reflects the implementation and gives a
    258 convenent way to encode the boolean/conditional aspect of the operation which
    259 is that a different virtual table might be in use.
    260 
    261 There are two general ways to reperent this; a cast or a field access. The
    262 cast is traditional and would definitely fit if a single pointer repersents
    263 a trait object with the virtual table as part of the object. However for a
    264 double pointer field access might be more approprate. By this system though
    265 it is not the type that is used as the identifier but the virtual table. If
    266 there is one table per type than it becomes equivilant again. Otherwise the
    267 table has to be used as the identifier and the type is just a result of that
    268 which seems important for syntax.
    269239
    270240Hierarchy
     
    590560be used in only some of the declarations.
    591561
    592     trait combiner fee = {summation_instance, sum};
     562    trait combiner fee = (summation_instance, sum);
    593563    trait combiner foe = summation_instance;
    594564
Note: See TracChangeset for help on using the changeset viewer.