Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: what would you like to see in perl5.12?

by holli (Abbot)
on Aug 20, 2007 at 12:34 UTC ( [id://633789]=note: print w/replies, xml ) Need Help??


in reply to what would you like to see in perl5.12?

"Real" and fast lvalue-subs that are able to "see" the right value (for checking), not the crippled implementation as today.

Yes, this is for accessors like $object->foo = "bar";, I grew up with VB and $object->foo("bar";) simply doesn't feel right.

I know it can be done by returning tied hashes, but that is fat, slow and ugly and needs extra work. Thinking about it, why not a new keyword:
package blablabla; sub new { #... } property get foo { return $self->{_foo}; } property set foo { my $foo = shift; $self->{_foo} = $foo; }


holli, /regexed monk/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-19 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found