Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5?

by Joost (Canon)
on Mar 09, 2005 at 11:47 UTC ( [id://437863]=note: print w/replies, xml ) Need Help??


in reply to (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5?

One of the features I didn't expect to ever be supported by perl5, but is available (as a beta) right now: Object attributes done right. (I saw Abigail's presentation at the Dutch Perl Workshop last month, and I was pretty impressed)

  • Comment on Re: (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5?

Replies are listed 'Best First'.
Re^2: (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5?
by Juerd (Abbot) on Mar 12, 2005 at 14:30 UTC

    Object attributes done right

    Where right is some weird kind of right that includes source filtering :)

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Re^2: (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5?
by Anonymous Monk on Mar 12, 2005 at 14:01 UTC
    Ever benchmark inside out objects? It can't be good
      Hmmm.....
      #!/usr/local/bin/perl -w use strict; package CA; use base 'Class::Accessor'; __PACKAGE__->mk_accessors(qw(a b c)); package LA; use Lexical::Attributes; sub new {bless [] => shift} has $.a is rw; has $.b is rw; has $.c is rw; package main; use Benchmark; my %methods = map { my $name = $_; $_ => sub { my $object = $name->new; $object->a(1); $object->b(2); $object->c(3); } } qw(CA LA); timethese (500000, \%methods); __END__ Benchmark: timing 500000 iterations of CA, LA... CA: 10 wallclock secs (10.25 usr + 0.02 sys = 10.27 CPU) @ 48 +685.49/s (n=500000) LA: 7 wallclock secs ( 5.98 usr + 0.00 sys = 5.98 CPU) @ 83 +612.04/s (n=500000)
      Doesn't look too shabby to me.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://437863]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found