Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by Roy Johnson (Monsignor)
on Feb 24, 2006 at 15:22 UTC ( #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.


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (15)
As of 2014-09-30 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (378 votes), past polls