----- Original Message ----

> From: Moritz Lenz <mor...@faui2k3.org>

> > That is the preferred way to avoid action-at-a-distance in P6.
> so if I do that, will a 'my @a' use that new Array class?
> Actually I'd prefer it if there were some kind of mechanism to set a
> default implementation type, so that I could write something along these
> lines:
> class MyArray is Array { ... }
> use Container :Array;
> then is this lexical scope all Array declarations and all Prelude
> operations that return Arrays return one of the type that I specified.

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.

Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Reply via email to