On Fri, May 27, 2005 at 22:59:25 +0200, Ingo Blechschmidt wrote:
> Hi,
> 
> what is the default invocant of methods?
> 
>   method blarb ($normal_param) {...}
>   # Same as
>   method blarb (Class | ::?CLASS $invocant: $normal_param) {...}
>   # or
>   method blarb (::?CLASS $invocant: $normal_param) {...}
>   # ?
> 
> I prefer the latter, as then one can't accidentally call a instance
> method on the class -- i.e.

I think I do too... In p5 this was a bit too easy to abuse.

However, I think this introduces another issue- how can we subvert
the parameter checking?

Sometimes it makes sense too call a method on a class instead of a
module, even if the author didn't think of it first. I'd like that
to be possible, and further more, I'd like subsequent calls from
that method to also ignore the type checking.

I think the mechanism I want is like C casts, in the sense that they
don't really do anything, they are more like "oh, it's ok, it can
pass as a ...".

-- 
 ()  Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418  perl hacker &
 /\  kung foo master: /me sneaks up from another MIME part: neeyah!!!!!

Attachment: pgpmVEVwb0y41.pgp
Description: PGP signature

Reply via email to