REBOL Enhancement Proposal: REP001
Version 1.0.0
Author: Jeff Kreis
1. Overview
2. Impact to DO/args
Users report that the current treatment of command line arguments is inadequate for their needs. Presenting the entirety of the command line arguments in a single string destroys the distinction between separate arguments. Proposed enhancement provides two views of command line arguments: one as a single line of text, another as a block of separated arguments as strings.
- Command line arguments need to be a readily DOable expression. In providing the command line argument as a single string (as is done now) this requirement is met.
- Command line arguments should be distinguishable with out the user having to explicitly insert delimiters. REBOL should be able to deal with command line arguments in a manner that is functionally equivalent to other command line utilities (shell scripts, perl, sed, awk, etc..) By providing a block with the arguments separated in strings this requirement is met.
- Command line arguments should not be able to prevent a script from running. This requirement means that the arguments can not be prescanned due to the fact that a syntax error found in the command line arguments will interrupt REBOL booting.
- Impact on system object should be minimal. To accomplish this requirement, we reuse one of our system object fields that is currently supplying redundant information. After starting REBOL from the command line, the present behavior is that system/options/args and system/script/args are set to the same string which contains all of the arguments. This behavior will be changed like this:
system/options/args == command line args as block of strings system/script/args == command line args as string
There is no change to the behavior of do/args.Copyright REBOL Technologies. All Rights Reserved.