1. A computer-implemented method comprising: exposing, by a processor, a host application object model to a program embedded in a virtual machine embedded in a host application by registering callback functions or methods in a first Application Programming Interface (API), wherein the first API is configured to provide access to a name space that encompasses class names in the host application object model, and the callback functions or methods registered in the first API allowing the embedded program to: create one or more class instances in a host application memory space, the class instances being objects; set and get properties of a first class instance that resides in the host application memory space; and invoke methods on the first class instance; exposing, by the processor, a virtual machine object model, which is associated with the embedded program and different from the host application object model, to the host application by registering functions or methods in a second API, wherein the second API is configured to provide access to a name space that encompasses class names in the virtual machine object model, and the functions or methods registered in the second API allowing the host application to: create one or more class instances in a virtual machine memory space, the class instances being objects; set and get properties of a second class instance residing in the virtual machine memory space; and invoke methods on the second class instance with a pointer reference; using, by the processor, different models of object lifetime for the host application and the embedded program such that a lifetime of a host object and an embedded object associated with the host object are not linked; transferring, by the processor, data between the host application and the embedded program through the first and second APIs, the first and second APIs not performing encoding or decoding of the data; using the second API to invoke a method on a class instance in the virtual machine from the host application or using the first API to invoke a method on a class instance in the host application from the virtual machine; and the callback functions registered in the first API and the functions registered in the second API using pointer references to objects, and the pointer references are passed as atoms between objects used by the host application and the embedded program, without being de-referenced.