- Well, I assumed that it must mean that the program should not contain any quotation marks (single or double) and, moreover, should end with an 'f'. Otherwise it would be as trivial (in Wren) as:
<lang ecmascript>System.write("Code Golf")</lang>.
- Of course, it will still be trivial in some languages anyway (cf. Raku) though there are may others where it's difficult to avoid quotation marks when dealing with string or character literals. --PureFox (talk) 20:04, 9 December 2021 (UTC)
I would like to propose revising the task description along the following lines:
Preamble: The "Code Golf:" prefix is intended for tasks in which a metric of "code size" other than code length is the focus.
To contrast the difference, this particular page asks authors to contrast a simple measure of code length with a syntax-oriented metric of size that conforms to the following principle:
- if E and F are functionally equivalent programs, and if E can be
obtained from F by decreasing its length (e.g. by shortening identifiers or removing white space or punctuation), then E and F have the same "code size".
Consider the class of programs, G, that emit the nine characters in the string "Code Golf", and define H as the instances of G that do not themselves contain string or character literals.
(1) Specify a metric for measuring program length (e.g. bytes or codepoints) and show a shortest instance of G using that metric.
(2) Using the same metric as in (1), show a shortest instance of H.
(3) Show a shortest instance of G in the sense that no further reduction by changing identifiers or removing characters is possible.
(4) Same as (3) but for H.
a) give some informative details about the run-time space requirements of the shortest intance of G given in (1). Alternatively, for languages such as C, show the size of the stand-alone executable produced by one particular compiler on one particular platform.
b) give or reference a script or program for measuring code size in accordance with the principle (*) above.