From: "Erik Bågfors" Date: 2002-01-03T05:02:45+09:00 Subject: [ruby-talk:30075] Re: Parrot (was re, Python and Ruby: a comparison) On Tue, 2002-01-01 at 21:07, Dan Sugalski wrote: > >* How will blocks be used from other languages that doesn't do blocks?? > > You're talking semi-standalone chunks of code that can be executed as a > sort of anonymous subroutine or method, right? Perl and Python both have > those. If a language doesn't have 'em, then it can't call into a function > that requires one. Not much to be done about that. (Though I don't see it > as a problem--the inter-language calling conventions define how you call > from one language to another, they don't require any language to actually > implement everything the convention allows) Well. The way blocks and iterators are used in ruby is not like it is in perl (I don't know python very well but I don't know of anything like that. for example: myObject.each { |x| puts x } How would that code look in perl(6) or python?? The normal way of doing it is for $x ($myObject.to_printable_array) { print $x."\n"; } that code differs alot between the languages. Ruby uses alot of iterators and I don't see how they can be used from other languages. How would the each-operator of myObject look for example ??? I'm sure it's solvable, I just don't know how? > >BTW, it's VERY nice to see a parrot designer here on the ruby-list :) > > I'm taking notes and trying to stay out of the way for now. :) Why?? I think ALOT of people here are interested. I know I am. btw, is perl6-internals the list for parrot-stuff?? Even if they are ruby-questions?? /Erik -- Erik B�gfors | erik@bagfors.nu Supporter of free software | GSM +46 733 279 273 fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32