[Catalyst] what is the type of $context?

A. Pagaltzis pagaltzis at gmx.de
Sat Jun 10 05:18:15 CEST 2006


* Nilson Santos Figueiredo Junior <acid06 at gmail.com> [2006-06-10 04:40]:
> I really can't imagine how it's possible to "fix" this kind of
> stuff you mentioned without:
> 
> 1 - Removing AUTOLOAD functionality;
> 2 - Removing the ability of declaring functions without defined
>     parameter lists.
> 
> AFAIK, both of these features won't be removed from Perl 6. So
> I really want to be enlightened regarding how this "fix" is
> supposed to happen.

Well, for one thing, Perl 6 disambiguates functions and methods.
Also, while you can define functions and methods that have no
more precisely specified call semantics than “is variadic and
takes anything,” you *can* define more precisely specified
semantics, unlike in Perl 5.

Similarly, if you have multiple possible signatures, Perl 6
encourages you to actually write the thing as a multimethod and
leave the choice of execution path up to the signature matcher.
In that case, even though your function/method can be invoked
with several different valid signatures, they can trivially be
enumerated.

As for AUTOLOAD, I don’t remember the specifics, but I remember
seeing mention by one of @Larry that there is going to be a
mechanism to make it more declarative, in addition to Perl 5’s
“anything goes” semantics.

So while Perl 6 won’t be as reliably introspectible as a static
language, it will be much, much easier to write robust code for
introspection than Perl 5 makes it. Like, *a lot* easier: you
won’t have to rely on guesses and heuristics for *everything*, in
fact, you’ll only have to rely on those for some edge cases, and
it’s likely that they’ll be so rare that you’ll be able to shrug
and say “not my fault that it doesn’t work.”

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list