The missing MOP

I knew I forgot something last time around. Perhaps that’s what you get for delaying things due to sickness.

I don’t know if this is even an issue for naked javascript, but one of the little things that annoy me in general is the fact that the global object (usually window) is accessible (and therefore enumerable) while context objects of functions aren’t. You can get a little mileage out of eval(), but that doesn’t help with the enumeration problem.

One use of this is the ‘publish’ operation I use in a few places to take a locally defined symbol and add it to an object that will be returned as an interface object. You can make this work with eval(), but the publish operation has to be redefined in every context because the eval gets bound to it’s context of definition.

Posted Saturday, February 2nd, 2008 under Devlog.

One comment so far