Am Montag, den 19.10.2009, 16:43 -0700 schrieb Jon Lang:
> Raphael Descamps wrote:
> > I personally don't understand why we don't have a exclude and alias
> > operator in Perl 6 but I have not read all the synopses and don't have
> > an overview.
> 
> I don't think that it's explicitly spelled out anywhere; but the
> reason is fairly straightforward: exclude and alias would break the
> interface.

You're of course right!

It's clearly explained in Apocalypse 12 (Conflict Resolution):
"A role without implementation degenerates to an interface".

I don't know why but I didn't realised before that not implementing
exclude and alias was in fact an important design decision: I have
probably read to much traits papers and not enough Apocalyses ;)

On one side you lose flexibility to resolve some composition conflicts
but the fact that a role also define a contract is of course a big win,
particulary for a language like perl 6 supporting optional statical
typing. The traits paper only focus on dynamic typing.
It also explain why perl 6 as a so strong support for delegation, as it
is the proposed way to solve composition conflicts.

It's time to read Apacalyse 12 again as I am now able to anderstand
it :)

Reply via email to