[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scriptometer: measuring the ease of SOP (Script Oriented Programming) of programming languages

Actually I'm not really crazy about either of the examples below because 
are both based on the bug-prone "programmer had better to remember to
check the error code" style rather than using exceptions.  I don't see 
any reason
why the usual pro-exeception-system arguments should not apply to scripts.

Dave Long wrote:

>% false || echo "false failed" 1>&2
>  if (Runtime.getRuntime().exec("false").waitFor() != 0)
>     System.err.println("false failed");
>but this doesn't scale to functions writing on stdout or stderr, or at
>least it works until the output is big enough for the pipe to be full.
>So an aspect of shell scripting is
>that it decouples command failure
>from command results, and perhaps
>more importantly, decouples data
>flow from control flow.
>Exceptions help with the former;
>what things help with the latter?
>(GC and list comprehensions?  GC
>and laziness?)