In QBasic, VBA, AppleScript, etc., there is an autoformatter that adds spaces and expands some syntactic sugar. For example, if I type this code:
?x*2
QBasic will expand it to
PRINT x * 2
Should I count this code as 4 bytes or 11?
Edit: Nathan Merrill brings up How to count bytes in macro heavy languages as a closely related question. I agree that it's related, but I don't think it's a duplicate. The reason why I asked this question is because the normal usage of these programming languages adds spaces automatically. It's not something that happens when the programmer chooses to expand macros--it's something that happens without any action on the programmer's part. It would be easy to conclude that the fully spaced version is the correct syntax of the language, and therefore that the condensed version is illegal for code golf submissions.
Here's a link to the answer that prompted me to ask this question. Also pertinent is this comment on my QBasic quine, which suggests that a quine using condensed syntax isn't valid because "the autoformatter can't be turned off" in QBasic 1.1.
qbasic /run mything.bas
. Now I wonder if that works with "unformatted" code. If so, I'd say it's still pretty obvious that it should count that way. \$\endgroup\$macroexpand
to control when it happens, but that's all. \$\endgroup\$