TSa wrote:
I'm not familiar with the next METHOD syntax.

It's simple: if a multi method says "next METHOD;" then execution of
the current method gets aborted, and the next MMD candidate is tried;
it uses the same parameters that the current method used, and it
returns its value to the current method's caller.  In effect, "next
METHOD" is an aspect of MMD that allows an individual method to say
"I'm not the right guy for this job", and to punt to whoever's next in
line.  If not for the possibility of side effects that occur before
the punt, one could pretend that the current method was never tried in
the first place.

I see that quite different: roles are the primary carrier of type
information! Dispatch depends on a partial ordering of roles. I
think all roles will form a type lattice that is available at
runtime for type checks.

True: the relationships between various roles and classes ("who does
what?") is needed for runtime type checking.  However, the _contents_
of the roles are only important for composing classes and for the
occasional runtime introspection of a role.  If roles are never
composed or inspected at runtime, the only details about them that
need to be kept are "who does what?" - and if all type-checking takes
place at compile-time, not even this is needed.

But now we're getting dangerously close to perl6internals territory...

--
Jonathan "Dataweaver" Lang

Reply via email to