Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Philosophies of Objects

by hv (Prior)
on May 24, 2006 at 10:37 UTC ( [id://551325]=note: print w/replies, xml ) Need Help??


in reply to Philosophies of Objects

What I've got is a variable name, a range of values I want it to take on, and other various and dynamic statements I want to eval within that loop before calling a coderef.

These are all programming concepts. To get to objects, you need to look beyond the code at the real life things you are modelling.

Does the variable contain a bank balance? Then maybe you'll want classes like Customer and Account and Transaction. But if it contains a height, or an acidity, or the number of oranges that fell off that tree last month, then you'll need different classes.

Or are you trying to provide a backbone of support for arbitrary variables? If so, I would probably not recommend this for a first OO project - with objects modelling concrete real world phenomena, the concrete reality is a great guide to implementation, and give you something to refer back to for every decision you make. With the very abstract the reality can (and must) guide you the same way, but it is more difficult to see the right questions to ask without having some previous experience of doing the same thing.

Hope this helps,

Hugo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-24 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found