[racket] Origin of ~a, ~s, ~v

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Sep 25 00:45:27 EDT 2011

7 hours ago, Jon Zeppieri wrote:
> http://www.lispworks.com/documentation/HyperSpec/Body/22_cd.htm
> 
> Looks like "aesthetic" and "standard."

Actually, in CLtL2 (which predates the hyperspec) they're listed as:

  ~A: Ascii

  ~S: S-expression

but it also has this before the list of format directives:

  The word or phrase at the beginning of each description is a
  mnemonic (not necessarily an accurate one) for the directive.

which is probably how the CLHS ended up with different names.

BTW, it's also similar to Emacs, where the "%S" format directive is
described as

  %S means print any object as an s-expression (using `prin1').

Still, I dug around a little, and found a description of `format' in a
Lisp Machine manuals from 1979 and on, which talks about "~A" without
any hook for its origin, but "~S" is said to print its argument "with
slashification", which is described as printing data in a way that can
be read back with `read'.  ("Slashification" is described as preceding
characters in symbols by backslash if they're special.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.