Welcome! Please see the About page for a little more info on how this works.

+1 vote
in Docs by

The doc string of * } says:

bq. When set to logical false, strings and characters will be printed with non-alphanumeric characters converted to the appropriate escape sequences.

This does not match how * } actually affects printing.

`
user=> (binding [*print-readably* false] (prn "\n" \newline))

nil
user=> (binding [*print-readably* true] (prn "\n" \newline))
"\n" \newline
nil
`

  • When * } is false, a 'non-alphanumeric' character such as newline prints as an actual newline (ASCII character 0x0a), not an 'escape sequence'.
  • When * is true, strings are wrapped in double quotes, and in both strings and characters some characters are printed as escape sequences.

The doc string also doesn't say how * might affect printing of other values, eg as with eduction. The purpose of the var is missing, namely printing for human versus machine consumers.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2357 (reported by glts)
...