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?? |
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.
In Section
Seekers of Perl Wisdom
|
|