Icon
Icon
Icon
Icon
Icon
Icon

Revamped object model using object handles

12:27 AM
0 comments


Background
In the Zend Engine 1.0 (and its predecessor the PHP 3 scripting engine) the object
model’s design is that instantiated objects are language values. This means that when
programmers are performing operations, such variable assignment and passing
parameters to functions, objects are handled very similarly to the way other primitive
types are handled such as integers and strings.  Semantically this means that the whole
object is being copied. The approach Java takes is different where one refers to objects by
handle and not by value (one can think of a handle as an objects’ ID).
Need
Unfortunately, the approach taken up to now has severely limited the Zend Engine’s
object oriented model, both feature and simplicity wise. One of the main problems with
the former approach is that object instantiation and duplication is very hard to control, a
problem which can not only lead to inefficient development but also often to strange run-
time behavior. Changing the object model to a handle oriented model will allow the
addressing of many needs such as destructors, de-referencing method return values, tight
control of object duplication and more.

If You Enjoyed This Post Please Take a Second To Share It.

You Might Also Like

Stay Connected With Free Updates

Subscribe via Email

teaser