On 5/4/2010 5:43 PM, Daniel Carrera wrote: > > 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 ...
I vote for standard perl syntax. the pdl executable is a nice shortcut but I like my perl programs to look like perl programs. > 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. I'm not clear what is meant here. The only difference between a perl script and the interactive perldl shell is that a return ends a command and that NiceSlice is automatically enabled for you. > 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. We adopted the return to enter a command rule unless the command is not finished (open block, braces, parens,...) Pretty much every interactive environment I have used executes commands by hitting enter. If this is a problem, current work on a perldl2 shell based on Devel::REPL will allow us to change the behavior if the user wishes. > 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. Try the new shell. The INSTALL and README are in the Padre subdirectory of the PDL distribution. It is a purely manual install but things are heading in the right direction... Cheers, Chris _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
