On Tue, Mar 22, 2005 at 05:18:44PM +0100, Thomas Sandlaß wrote:
: Rod Adams wrote:
: > multi sub postcircumflex::<[ ]>(MyArray $obj : [EMAIL PROTECTED]) is rw 
: >
: >but I'll wait for S14 before speculating further.
: Will that ever be written? And if yes, will it be like S13 which
: is basically saying that overloading is subsumed by A12/S12?

We'll might put a few things into S14 eventually if they seem to be
causing confusion.

: I see the 'does' operator as the sole successor to tie/bless.

We still have a Class.bless, but it does something a bit different on
standard objects, where it now fires off all the internal allocation and
initialization routines.  But yes, for adding functionality to an existing
object, 'does' (and 'but') are better ideas.

: There are actually three tasks for 'does':
: 1) declarative compile time role composer

When applied to a class definition.

: 2) declarative compile time contraint imposer

When applied to a variable or parameter.

: 3) imperative runtime on the fly class composer

When applied to an object (or class?).  In its imperative it always
creates an anonymous class via mixin, rather than trying to level
everything as 1 does.

:    (does operator 'but' do similar things on copies?)

That seems to be the effect of it.

: 1 and 2 are backed by the runtime dispatch and type check system.
: Depending on compiler switches they also constitute the compile
: time type checking.

You can theoretically choose your level of pain in Perl 6.  To what extent
we can make that work out in practice remains to be seen.


Reply via email to