You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will significantly improve the ability to inter-operate with our existing C++ code without using compiler support (because virtual inheritance uses the virtual dispatch mechanisms used by functions).
the purpose of Object is really about is a shared header for the object with the following: The root pointer, the type pointer, and memory information. Object is just a pointer and management class around that header.
Deal with Aspects:
Currently aspects expect that they can know the current object (e.g. through the virtual object), to maintain this use templates better. Add back the Implements<SAspect>::For<SomeType> and (through templates or a different name like Inhereting or Subtyping know that you can) use a static_cast<Object*>(static_cast<SomeType*>(this)).
Deal with multiple inheritance of base objects:
Currently this is done with compiler support using virtual inheritance. With the type system we can record a list of Object enabled objects and mutate them before/on construction.
Clarify the setup order for instances:
Construction of header and the memory for the type, then call the initializer (with type dispatch)... if we use placement new and mutate the memory ahead of time we could use constructors as initalizers (might need a check in Object in case some chuckle head calls new on one).
Support runtime sized types:
Allocate the header and object memory at the same time so they are contiguous - with the right template flag on the type - lookup the run time type size.
Remove public virtual Object from all the objects, replace with protected Object (or public?) where necessary.
C++ is a powerful statically compiled language that has to keep that power open for the future (e.g. through virtual function tables and virtual base objects being pointers). craft-type is a powerful multi-paradigm helper designed to support dynamic code generation, hence it is designed with the understand that it will always have all the necessary information (because it supports mutating it later).
The text was updated successfully, but these errors were encountered:
This will significantly improve the ability to inter-operate with our existing C++ code without using compiler support (because virtual inheritance uses the virtual dispatch mechanisms used by functions).
the purpose of
Object
is really about is a shared header for the object with the following: The root pointer, the type pointer, and memory information. Object is just a pointer and management class around that header.Currently aspects expect that they can know the current object (e.g. through the virtual object), to maintain this use templates better. Add back the
Implements<SAspect>::For<SomeType>
and (through templates or a different name likeInhereting
orSubtyping
know that you can) use astatic_cast<Object*>(static_cast<SomeType*>(this))
.Currently this is done with compiler support using virtual inheritance. With the type system we can record a list of
Object
enabled objects and mutate them before/on construction.Construction of header and the memory for the type, then call the initializer (with type dispatch)... if we use placement new and mutate the memory ahead of time we could use constructors as initalizers (might need a check in Object in case some chuckle head calls new on one).
Allocate the header and object memory at the same time so they are contiguous - with the right template flag on the type - lookup the run time type size.
public virtual Object
from all the objects, replace withprotected Object
(orpublic
?) where necessary.The text was updated successfully, but these errors were encountered: