As Japt grew up, I added more features, one of which is a set of flags that slightly change the behavior of the program. Because Japt could only be run in the online interpreter, and Japt parses the input as literals (i.e. strings must be wrapped in quotes, arrays in brackets), I just decided to stick flags in the input box.
This is where the confusion lies. Japt currently can't be run directly from the command line (I'm working on that), so there's no way to include flags as actual arguments; they have to be part of the input. So the question is, how should we score flags in Japt? (Or perhaps they should not be allowed at all in their current state?)
Side note: flags can appear anywhere in the input, up against any of the input types, except it can't be touching a number on the right side. So you can stick any individual flag after the end of the input, adding two bytes. For example:
This is parsed as the string
"abc", the number
123, and the
Other than this, I believe flags in Japt work the same as in any other language. You can do e.g.
-Pg!, which will parse as the
-! flags, and you can do e.g.
-g3, which will parse as the
-g flag with an argument of
Also, I couldn't manage to find our current consensus on how flags are scored in other languages, though I believe it's just the number of bytes added to the command to invoke the flags.