# from Lutz Gehlen # on Monday 30 June 2008 11:43: >> If the only call needed is mk_exception_functions(), that could >> just be import(). > >Well, the reason against that is the mk_exception_methods function I >just mentionend. But I had not thought of using import,
Yes, even in the case of creating methods, this could be done with options to import() rather than requiring the caller to inherit you as a base class. If you can possibly avoid requiring inheritance as an interface to these sorts of meta-class tools, it allows the user more flexibility in defining their class hierarchy and eliminates the risk of method name clashes between the meta and their own parent class. Extra points if you implement unimport(), which means the caller can say 'no Meta::Thing' so that the functions only exist at compile-time. This eliminates all risk of cryptic, tricky, and unexpected run-time errors from method-lookup name clashes. --Eric -- "But as to modern architecture, let us drop it and let us take modernistic out and shoot it at sunrise." --F.L. Wright --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------