gnat writes "The Scriptometer attempts to measure the ease of scripting in different languages. While it's not the pinnacle of scientific impeccability, it's an interesting idea and Perl comes out well."
And the poor Java programmer has to be staring at this:
import java.io.*;
public class system {
public static void main(String[] args) throws Exception {
if (Runtime.getRuntime().exec("false").waitFor() != 0)
System.err.println("false failed");
BufferedReader input = new BufferedReader(new InputStreamReader(
Runtime.getRuntime().exec("echo done").getInputStream()
));
String line;
while ((line = input.readLine()) != null)
System.out.println(line);
}
}
And wondering how Perl gets away with:
system "false" and warn "false failed\n"; system "echo done"
I seriously doubt that anyone is going to convince me that the Java example is (in this admittedly biased case) easier to read than the Perl example.
Re:And for the Java programmers
mary.poppins on 2004-06-16T10:14:23
Friends don't let friends use static typing without type inference.