Re: IDL Virtual Machine information [message #35651 is a reply to message #35650] |
Thu, 26 June 2003 15:14   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
JD Smith <jdsmith@as.arizona.edu> writes:
>
> That said, there are lots of uses of EXECUTE which are no longer
> really necessary in IDL 6.0, e.g., building variable-length argument
> lists of dimensions for various routines (I've noticed Craig using
> that trick a lot). Since the VM will only run .sav files compiled
> with IDLv6.0, there's no need to hang onto these old constructions for
> compatibility's sake. Perhaps people could list their typical uses of
> EXECUTE and we could consider ways to eliminate them?
I generally try to avoid EXECUTE(), but end up using it in several
different ways. One is to handle the stupid dimension-list behavior
of REBIN, but that may be fixed in newer versions of IDL.
Another is allowing users to enter expressions to be evaluated. This
includes fitting routines like MPFIT (parameter constraints),
MPFITEXPR and CHEBCOEF. I don't know a way of evaluating a
user-function without EXECUTE.
There is a more esoteric set of routines which uses EXECUTE() to
extract a particular argument from an argument list. For example, if
my routine is defined as:
pro mypro, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, ...
then one can use EXECUTE to pull out each of the x{i} arguments
without writing testing each one manually (eg CMRESTORE, FXBREADM,
PRINTLOG, TRANSREAD).
A final way is to make complex expressions which I couldn't figure any
other elegant way to do. For example, constructing a template
structure in TRANSREAD.
I fully admit that the IDL VM sounds like a really interesting way of
getting more people to use IDL software, and I'm sure that's why RSI
developed it. It will lower the barrier for distribution of
IDL-related packages, which RSI probably hopes will drive more sales
when package recipients realize how great IDL is.
*BUT*, I think developers should consider the IDL VM as a separate
platform to develop for. It requires more discipline to avoid
EXECUTE(), more careful checking that supporting library routines (and
as Reimar points out, event IDL standard library!) don't trespass
either. It means that existing code can't be pressed immediately into
service without vetting it, and some functionality that requires
EXECUTE() may need to be stripped away. This may or may not have
significant costs.
For these reasons, I don't think the IDL VM will be a big hit. It
will be nice, but not big.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|