Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[6.d] Set $*ARGFILES to $*IN inside sub MAIN
- Per 6.d-prep
- This lets users use `lines()` and similar shortcuts that work on
$*ARGFILES and get data from STDIN, without having arguments
that drive the MAIN sub be interpreted as filenames- Loading branch information
1 parent
d2116ef
commit 84d45f0
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84d45f0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zoffixznet I'm not sure why
$IN-as-ARGSFILEScouldn't have been made a named variable, thus conserving the API that existed before. Is there a specific reason that you made it a positional I'm missing here?Related: do you know where
$retvalis actually being used? I couldn't find any use of it.84d45f0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall any, other than the vague idea that positionals are faster than nameds (don't know if it's still true). I didn't consider MAIN_HELPER a public routine, so I didn't concern myself with any APIs.
Don't know.
84d45f0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(P.S.: if it's going to become an API, we should try to use kebob-case in its name for consistency with other things)