As observed by the implementation of _GetAddrInfoForHost:..., we are going to need primitives which return custom objects in the future. I want this to be implemented easier. Right now, we manually create a slots object, but this obviously will not scale; I'd much rather have an easy way of implementing and registering a new object instead.
Of course, with this comes the problem of how to represent the object types. Right now, we encode the object types manually; this also will not scale. We are going to need a vtable implementation for this, where objects can register themselves.
Obviously, other places which switch on the object type will also no longer work. We will also have to move those to each individual object, and have some of that dynamic dispatch goodness on the VM side too. ;^)
As observed by the implementation of
_GetAddrInfoForHost:...
, we are going to need primitives which return custom objects in the future. I want this to be implemented easier. Right now, we manually create a slots object, but this obviously will not scale; I'd much rather have an easy way of implementing and registering a new object instead.Of course, with this comes the problem of how to represent the object types. Right now, we encode the object types manually; this also will not scale. We are going to need a vtable implementation for this, where objects can register themselves.
Obviously, other places which switch on the object type will also no longer work. We will also have to move those to each individual object, and have some of that dynamic dispatch goodness on the VM side too. ;^)