[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





Pixel wrote:

>Ken Anderson <kanderson@bbn.com> writes:
>
>>I like your approach, but i think it is weighted too much toward the
>>empty expression, and "hello world" examples which aren't representative of
>>scripts people write.
>>
>
>the "empty" is merely for calibrating the scoring,
>
As I said in offline mail to you, the "empty" is really a cheap shot and
doesn't demonstrate anything useful.  It hurts the credibility of the
exercise and makes it look like we're trying to diss Java just for the 
hell of it.
This is not needed.  You can make your points much more substantively.
Don't give the critics cause to make you look like you're biased.

>
>
>and i do want to add more different things.
>
>i wanted to split the various things needed in a script...
>
>>How about something a little bigger, like writing something that could compile
>>everything that needs compiling in a directory and it subdirectories.
>>
That sounds great.

>>
>
>something like this?
>
>Dir['**/*.c'].each{|c|
>  o = c.sub('\.c$', '.o')
>  if !FileTest.exist?(o) || File.stat(o) <= File.stat(c) then
>    puts "compiling #{c} to #{o}"
>    system("gcc", "-c", "-o", o, c)
>  end
>}
>
>there surely are interesting things here:
>- replacing .c with .o (at the end)
>- stat'ing files
>- system
>- simple formatted print
>- looking for files in a hierarchy
>
>- one could add a usage and argument handling
>
Yeah, exactly the kind of thing I think of as script-oriented.  Very good.

>
>
>but do you think it's better having all this in one program? This will
>make the comparison less precise. i've already put a "simple formatted
>print" example, and a "system" example.
>
Yes, this is a great example, because it's so real.  This is just the 
kind of thing one generally
is trying to do with a "script".