Re: class interface of roles

2006-10-27 Thread TSa
HaloO, I wrote: And finally the combined class class GenLocSquare is GenSquare does GenPointMixin {} I'm still pondering how one achieves method combination of the role's and the class' methods. Here are two ideas. The first is to use an 'is extended' part in the role that re-opens the

Re: class interface of roles

2006-10-27 Thread TSa
HaloO, I wrote: role GenPointMixin { has Int $.x; has Int $.y; is extended { That should be spelled 'is also'. How does such an 'is also' block address the former class definition block? Is it OUTER::? Or SUPER::? The latter would mean that class extension is a kind of

MMD function __add not found

2006-10-27 Thread François PERRAD
In PIR language, I create a new class 'thread' by subclassing 'Parrot::Coroutine'. And I want write a method '__add' for support the opcode 'add'. But, I can't found the correct syntax. Is it possible to mix :method and :multi ? # languages/lua/lib/thread.pir extract .namespace [ 'Lua' ]

Re: [QUESTION] PMC Pre-allocation

2006-10-27 Thread Allison Randal
Pulled from the archive at Leo's request (thanks Leo). Leopold Toetsch wrote: It originated in a perl5-ism in the first array implementations, following the perl-way: $elems = scalar @array; which was directly translated to: set I0, P0 This works at least for small arrays. The