Closed ngn closed 8 years ago
FYI, Kona uses _a
for this.
Kona also includes filename.k
in _a
.
x
looks more natural to me -- the way a function has an argument, the whole program has (a list of) command-line arguments.
I think that @ngn's approach here is reasonable. I have no idea how (if?) k5 exposes argv to scripts, but I don't consider strict compatibility with k5 very important in the repl itself, as it is separate from the interpreter and by design users can furnish their own alternative frontends.
When oK is run as
./repl.js filename.k arg0 arg1 arg2
, it may be convenient to have(arg0;arg1;arg2)
asx
in the global scope.