I suspect most people using objects in Perl 5 do so because they have some project to finish, not because they want to understand how an object system works
At this point, people who are just getting things done, aren't they likely going to make bad decisions? This is even more likely when you don't understand what you are working with. So they do something stupid and get away with because the effects are not obvious or not crop up that often.
Not understanding what you are working on will eventually come back to bite you in some way or another. Looking at all the software that I have had to work with over the years it has been consistent. Few people bother to understand what they are trying to do and eventually screw it up leaving a mess for someone else to clean up.
| [reply] |
Not understanding what you are working on will eventually come back to bite you in some way or another.
What part of Moose hides the effective understanding of classes, instances, attributes, methods, and method dispatch from the user? What part of blessed hashes bestows greater understanding?
You're making a straw man argument that people who roll their own object systems understand more about the problem domain than people who use well-designed, well-tested, robust existing object systems, as if throwing just enough code together to solve what you think is the problem produces complete understanding.
If that were the case, we wouldn't have Matt's Script Archive. We wouldn't be able to find at least three and usually seven bugs in hand-rolled CGI parsers. (We wouldn't see people storing plaintext passwords in databases.)
| [reply] |
I not saying they should write their own and publish it. The argument I am making is that that people who have tried to roll their own are more likely to understand issues that crop up, because they encounter them as problem. Therefore are more like to understand and appreciate what a OO system provides.
| [reply] |
Well, I assumed that the OP wants to learn OOP in Perl, not to finish some project on a deadline. And I (still) believe that there are people out there who want to understand the basics of a programing language before trying to "get something done" with it.
| [reply] |
I (still) believe that there are people out there who want to understand the basics of a programing language before trying to "get something done" with it.
Why stop at blesssing hashes then and not have them write their own method dispatch systems? The blessed-referent, package-is-a-class, method-is-a-sub bare-bones approach of Perl 5 doesn't teach much about OO. It instead teaches a lot about how to smoosh together a few orthogonal concepts into the skeleton of an OO system.
To whom is that valuable?
| [reply] |
| [reply] |