Re: [RFC][PATCH] Small enhancement for Glib::Object::Subclass



* Ross McFarland <rwmcfa1 neces com> [2004-05-11 20:34]:
basically my question is what is insufficent/wrong about doing
things like this:

Lack of abstraction. A more declarative mechanism would be nice
to have.

rather than having the extra overhead of looking for the sub
with the upper cased version of the property name.

I don't particularly like it either. Magic names are almost never
an optimal interface. I'd prefer having a method to register
coderef callbacks for accesses to given property names; the
$self->can() check would then be replaced by a simple hash lookup
on the property name. Much cleaner, barely any extra overhead.

-- 
Regards,
Aristotle



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]