Re: Shootout Benchmarks

2011-01-08 Thread Guy Hulbert
On Sat, 2011-08-01 at 09:44 -0800, Isaac Gouy wrote: I will try to see if there's any more sane way to do this http://alioth.debian.org/scm/viewvc.php/shootout/bench/?root=shootout Thank you very much. Trying CVS was on my list of things to do but that will save me some time (and it was

Dynamic method generation?

2011-01-08 Thread Sean McAfee
Hello-- I recently wrote some Perl 5 code similar to the following, and I'm wondering what might be the analogous construction in Perl 6: package MyMatcher; my @SIMPLE_FIELDS = qw(FOO BAR BAZ BLETCH QUUX ...); for my $field (@SIMPLE_FIELDS) { no strict 'refs'; *{ is_\L$field } = sub {

Re: Dynamic method generation?

2011-01-08 Thread Moritz Lenz
On 01/08/2011 09:11 PM, Sean McAfee wrote: package MyMatcher; my @SIMPLE_FIELDS = qw(FOO BAR BAZ BLETCH QUUX ...); for my $field (@SIMPLE_FIELDS) { no strict 'refs'; *{ is_\L$field } = sub { shift-_matches($field) }; } class MyMatcher { for FOO BAR BAZ BLETCH QUUX - $field