Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^5: What are the core points of good procedural software design? (functions, code structuring)

by moritz (Cardinal)
on Jun 23, 2008 at 12:42 UTC ( [id://693512]=note: print w/replies, xml ) Need Help??


in reply to Re^4: What are the core points of good procedural software design? (functions, code structuring)
in thread What are the core points of good procedural software design? (functions, code structuring)

Taking a "spaghetti code" using only global vars and forcing it into an object seems to me a little like sweeping the dust under the carpet: it's a little better, but very little, and perhaps it doesn't worth the effort.

Agreed, but if done right the "sweeping dust under the carpet" can still help you. Mainly it often allows you to have multiple objects although the original author thought you'd never need that, thus didn't provide the necessary hooks.

For example if Data::Dumper didn't offer an OO interface, it would be virtually impossible to use it with different configurations in different modules. I have no idea how it's implemented, but even if just swept all globals under the carpet of a single object, I'd still appreciate the difference.

(Mind you, I didn't look at the source code. I have no idea how it's implement. This is just a discussion about the interface).

  • Comment on Re^5: What are the core points of good procedural software design? (functions, code structuring)

Log In?
Username:
Password:

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

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

    No recent polls found