I don't know if this was considered a non-issue when I last raised it,
but in this synopsis:


I see that the behavior of .can() metamethod hasn't been updated.  My
concern is that someone calls $object.can('bark') and they expect to
pass an integer to the method but there is no method 'bark' which
accepts an argument.  .can() will still dutifully return a method (or
methods) to you.  Thus, .can() will lie to you because you can't say:

  $object.HOW.can( ... some signature ... )

Perl 5 couldn't really solve this and programmers just had to "know"
that all methods were implicitly variadic.  I seem to recall that Larry
had an idea about how to specify a signature (I could be misremembering
and I can't find the response).

Has there been any more thought about how to appropriately deal with
this?  Though I could be in the minority, this does seem like a glaring
hole in Perl 6's OO behavior.


Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog     - http://use.perl.org/~Ovid/journal/

Reply via email to