Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^9: Class::Accessor and Damian's PBP

by Roy Johnson (Monsignor)
on Feb 24, 2006 at 15:22 UTC ( [id://532572]=note: print w/replies, xml ) Need Help??


in reply to Re^8: Class::Accessor and Damian's PBP
in thread Class::Accessor and Damian's PBP

I am criticizing the Lvalue approach because it does not solve the problem you stated
I didn't offer it as a solution to having a lot of accessors. What I offered as a solution to that was that the OP re-examine his approach. It would be impossible to suggest anything more specific, because we don't know what the requirements of the task are.

Then I started a new paragraph to address a different issue that the OP wanted to address: that there be a clear syntactic distinction between set and get, so that setting isn't done by mistake. Lvalues do make that distinction clear.

If you do it in your own code - whatever. But please don't recommend to others to use these things too.
I recommend that others look at the various options available to them and make their own decisions. If they find your arguments compelling, that's great. But they shouldn't be browbeaten into following your approach, or Damien's, or mine. It is NOT true that they absolutely must value simplicity of implementation (a lower level of abstraction) over elegance of interface (a higher level of abstraction). That is a trade-off that might have different "right" answers depending on the target user and usage.

Your complaints about "weird hacks" are irrelevant. Those are implementation details, and the user need not be concerned about them. The user is concerned about a usable interface and performance, and sometimes there are trade-offs in one to improve the other.


Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-03-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found