Monday, October 26, 2009

The internal implementation of the allocate reference

I am now exploring the idea that allocates reference will be implemented as a new type of reference like soft, weak and phantom reference. it looks like allocate reference are completely the opposite of phantom reference since the get method can't return null. the idea is that every declaration of String $moshe will be translated to the following: AllocateReference moshe when the 'get' method return the value of moshe. this one is very useful since you can extend the allocate reference and customize allocate reference for your own needs. The only question is the preformence issue. Is anyone knows what is the performance penalty for using references?