On Fri, 23 Aug 2002 16:56:54 +0200 Aldo Calpini <[EMAIL PROTECTED]> wrote:
> I stumbled upon this because I'm trying to implement an > Iterator PMC (almost done), and the most obvious way I've > found to bind the iterator to what it should iterate is this > one: > > new P0, .PerlHash > new P1, .Iterator > set P1, P0 # tells P1 that he's going to iterate P0 This looks like a kludge. IMHO the correct way of getting an iterator is having the aggregate return it (say, using find_method/invoke); and the iterator does not need to be of class Iterator, it just needs to behave like one. Otherwise your Iterator needs to know all the types it has to iterate over, which is bad. Regards Mattia