Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Language design: direct attribute access and postponed mutators (Perl Vs Python)by LanX (Saint) |
on Sep 15, 2019 at 22:03 UTC ( [id://11106214]=note: print w/replies, xml ) | Need Help?? |
> I'm not sure where you get this "very uncommon in Perl" from. I think I've read it in pretty every OO tutorial I've seen, including PBP and Damian's OO book. The explanation seemed very obvious to me, since one is directly accessing the internal implementation of a blessed hash.
> Also, DBI does that as well (but uses tie) behind the curtain. Uhm, I ignored this till now ... but DBI is a very byzantine module anyway. But you convinced me to s/uncommon/oldfashioned/ , thanks :)
Cheers Rolf
*) OK you can tie the hash/data structure, but this will slow down all internal access to any $self->{attribute}
In Section
Meditations
|
|