Craig DeForest <[email protected]> wrote:

> > ~ $ perldl  myprogram.pdl
> 
> Already been done :-)  In fact, the "pdl" executable exists only to  
> chain into perl so you can run pdl scripts from the command line:

Interesting. Two questions:

1) Why don't you use "perldl"? More command names => Users are less
likely to find it. I sure haven't seen it mentioned in the docs.


2) Why does it behave just like the command line? To me it seems that
it just makes it less useful. You can't use "pdl" as the standard way
to write PDL applications.

What I was really suggesting was something more akin to a real Perl
program. My goal was to use "perldl" to write complete programs, so
that writing:

#!/usr/bin/perldl

... some stuff ...


Is exactly equivalent to:


#!/usr/bin/perl

use PDL;
use PDL::Autoload;
use PDL::NiceSlice;

... some stuff ...



Imagine for a moment that you are a Matlab or IDL user trying out PDL.
It seems sensible to use the same binary for both the command line and
the program, and it seems sensible that the code should look basically
the same. The last thing you want is to spend a couple of hours trying
to figure out why your program is crashing even though all the
instructions seem correct when you try them on the command line.

And if people are going to use "perldl" or "pdl" as the standard way to
write complete PDL programs, I don't think we want to be changing the
character of the Perl language by adopting the Python-like "one line =
one statement" rule.

Finally, for users who do come from the Perl world (such as myself), I
think it is important that PDL program still feel like a Perl program.

Anyway, that's my opinion. I hope some of what I said makes sense.

Cheers,
Daniel.

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to