develooper Front page | perl.perl5.porters | Postings from March 2011

RE: Revising Perl's OO docs - a new OO tutorial

Thread Previous | Thread Next
Jan Dubois
March 8, 2011 08:22
RE: Revising Perl's OO docs - a new OO tutorial
Message ID:
On Mon, 07 Mar 2011, Abigail wrote:
> I would go the other way. The fact that calling a method is implemented
> as storing/fetching a value is an implementation detail that should not
> be exposed to the user. Hence, it should not have a different syntax.

In that case I don't understand why you ever use tie() instead of
calling your FETCH and STORE functions directly? It is exactly the same
kind of syntactic sugar as attributes/properties on objects:

* Tied variables look like variables but are implemented as function calls.
* Properties look like fields but are implemented as method calls.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About