Ovid wrote:
> Actually, I'd prefer to go much further than this:
>
>  use Core 'MyCore';
>
> And have that override core classes lexically.
>
> That solves the "but I want it MY way" issue that many Perl and Ruby 
> programmers have, but they don't shoot anyone else in the foot.

Since 'use' imports its elements into the current lexical scope, the
version-based approach can do this.

The only catch that I can think of has to do with derived classes:
does the existence of a customized version of a class result in
same-way-customized versions of the classes that are derived from the
original class?  That is, if I added an "updated" version of Foo, and
Bar has previously been defined as being derived from Foo, would I get
a default "updated version" of Bar as well?  Or would I have to
explicitly update each derived class to conform to the updated base
class?

-- 
Jonathan "Dataweaver" Lang

Reply via email to