[Openmcl-devel] FORMAT ~A
Gary Byers
gb at clozure.com
Wed Dec 18 19:02:22 PST 2002
On 18 Dec 2002, Marco Baringer wrote:
>
> ? (format t "~A" :k)
> K
> NIL
>
> I would really, really, really have prefered that to be
>
> ? (format t "~A" :k)
> :K
> NIL
>
The current behavior (e.g., not printing the #\:) of PRINC and (FORMAT
.. "~A") is correct.
> (when error messages start printing things that are different from
> their args (and you're explicitly testing for keywordp) this "feature"
> can be a bitch)
>
> I think it's a bad idea because this is printing a different thing
> than its arg, it's not a question of aesthetics, imho. i looked at the
> standard and i guess it depends on what "package prefix" is taken to
> mean, ie is the #\: in :K a package prefix or not?
>
The hyperspec glossary indicates that a package delimiter is that part
of the package prefix that follows the package name. Section 22.1.3.3
goes into much greater detail about how various printer control variables
(including *PRINT-ESCAPE*) affect the printing of symbols.
I would agree that too much information in an error message is generally
better than not enough, which suggests that condition parameters and
context are -often- better presented with ~S than with ~A (where "often"
means "almost always".)
> --
> -Marco
_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel
More information about the Openmcl-devel
mailing list