Okay, so let me see if I can tie everything together:

       1) What's really wrong with DOing formed strings? 

          Well, besides the inefficiency factor (and every
          little bit counts -- lots of little inefficiencies
          pile up...) there's also a base philosophical issue.
          Can I get away with just saying that "DO FORM block"
          is sort of unREBOLish?

       2) What about cluttering the system object? 

          When you start something from the command line, both
          system/script/args and system/options/args are set
          to the same args. (Remember that system/script/args
          is what's used for DO/args).  By making one of the
          two slots a block of the separate arguments, we'll
          actually be lowering the redundancy of information
          in the system object for from the command line case.
          
          The caveat, of course, is that which ever form of
          the args goes in system/script/args on boot up, that
          data will be clobbered by DO/args so the programmer
          will need to ferret it away if they want it later
          on-- but everyone should be able to live with
          that...

       3) What do people want DOable args for?

          It's part of better command line integration.  Below
          is a little example of the use of DOable
          args. I call the script "reb" and put it in my
          private bin/ directory:

  ---------------------------------

#!/path/to/rebol -qs
REBOL [File: %/home/me/bin/reb]
random/seed now
print do system/options/args

  ---------------------------------


   Using the above script opens up lots of possibilities. From
   the command line you can do stuff like this:

## Quick command line calculator
reb "1 + 2"

## Help create filenames -- nicer than using unix 'date' command
cat log > log`reb now/date`.txt

## pick a random file
foo=`reb x: read %. prin pick x random length? x` 

## dump mail to file 
reb read pop://me:pass@site > mail-box

    The possibilities are endless. REBOL one liners really can
    be handy from the shell. You can mix in a little bit of
    REBOL into shell expressions and you get a pretty swell
    enhancement to life in the process. :)

    Any other args, pro and con welcome. I'll put the whole
    thing together into a "Request For Enhancement" and nail
    it to Carl's door.. (;  

    -jeff


Reply via email to