Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Are global variables "bad"?

by dwm042 (Priest)
on Apr 22, 2009 at 19:37 UTC ( [id://759385]=note: print w/replies, xml ) Need Help??


in reply to Are global variables "bad"?

Some comments, as I was doing scientific programming of one kind or another for a number of years..

1. Small scientific programs without fancy output generally don't need objects.

2. Your program, however, is about 80% of its way to using an object.

3. As long as you only wish to display 1 dataset you're fine as you are.

4. Should you ever wish to get fancy with your display, such as embedding a different dataset as an inset view, then you can start encapsulating your data along with their associated screen transformation parameters or drive yourself crazy. And as ELISHEVA has pointed out, it's easier to manage input options with an OO framework.

Update: Clarified some language.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found