[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
When should objects be used?
- Subject: When should objects be used?
- From: "Richard G. French" <rfrench(at)wellesley.edu>
- Date: Thu, 24 Jun 1999 20:33:27 -0400
- Newsgroups: comp.lang.idl-pvwave
- Organization: Wellesley College
- Reply-To: rfrench(at)mediaone.net
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:15357
Nearly all of my IDL programs started as interactive bits of code, saved
a journal file and then expanded into programs. The main power of IDL
for me is to be able to tinker with the code quite easily, try different
things out, and then finalize the code in the fashion that works best.
Most of these programs are the old-fashioned kind where you specify the
conditions at the start (the data to be
analyzed, the conditions of the analysis, the form of the result) and
through the processing in a fairly linear fashion, without a lot of
interaction along the way. In fact, when I produce PostScript files for
publications, I generally do
it by having a specific parameter file to go with each figure, such that
reliably reproduce the figure exactly by running the code again. I had
previously, I had often produced figures from highly interactive
had a hard time figuring out just exactly what was done to produce them.
All of this is by way of saying that this sort of programming seems to
be the opposite of object oriented code or widget programming, which
often seems to involve
lots of interactive choices along the way. Thus, I have never taken the
learn object oriented programming, but I have a feeling that I am
missing the parade
and I'd like to know what I am missing.
Could some of you who might have started out doing things the way I do,
who have converted to object-oriented programming, tell me if there is
something to be gained by my revising my programming style to use
objects? I have developed a nice
library of IDL procedures and functions to do my kind of processing, but
I have not
done the same with widgets, and I have never tried doing it with
To provide a specific example, I have written some IDL code to
the exact locations of small Saturnian satellites in Hubble Space
to fit orbits to these positions, and to produce TeX tables of the final
results. Do you see obvious advantages to trying to do some of this
Thanks for any insight you can provide. My problem is that so much of
the discussion of objects seems abstract that I have a hard time
figuring out how to
translate it to the problems I am trying to solve.