-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set I/O formatting options in the code, not with flags #42
Comments
Details: The flags in question are For example, suppose Another possibility would be to put the I/O format specifier at the end of the program, or possibly input specifiers at the beginning and output specifiers at the end. Placement at the end of the program has the advantage that there are a lot more characters that would work: As part of this change, it may make sense to also change the default List output formatting to match the repr (currently This change breaks backwards compatibility, especially if the default format is changed. Therefore, it will not happen any earlier than version 2.0. |
Possible mapping from flags to I/O configuration characters, if the config is at the beginning of the code:
Since Possible mapping from flags to I/O configuration characters, if the config is at the end of the code:
The fact that there's more characters available means it would be easy to add new options: Adopting a hybrid strategy is also possible... Beginning-of-code config (affecting input and execution):
End-of-code config (affecting output):
|
Potential problems for config characters at the beginning of the program:
Potential problems for config characters at the end of the program:
I think the best approach is to scan the program first and then check if the first/last token is a config character. This militates in favor of putting config characters at the end, since programs can't end with operators but they can begin with them. E.g. |
Context
WHEREAS, when Pip was first created, its command-line flags were intended to count as +1 byte each, according to the then-current scoring rules of Code Golf StackExchange;
WHEREAS, Code Golf StackExchange no longer adds flags to the bytecount;
WHEREAS, however, using free flags to obtain a different output format is considered unsporting by several CGCC members;
WHEREAS, after considering their arguments as regards other languages, I have come to agree that setting the I/O format ought to cost bytes;
BE IT RESOLVED, THAT all Pip flags affecting input and output behavior be removed, and syntax be added to perform the function of each such flag in 1 byte of code.
The text was updated successfully, but these errors were encountered: