Please check that what you're proposing isn't already in the standard.
Current practice: (define-condition foo () ((((slot-name-symbol . "slot form"))))) signals an error in CMUCL release-18e-branch, SBCL 0.8.9.46, and CLISP 2.32.
The :REPORT option of DEFINE-CONDITION defines a method for PRINT-OBJECT, so the issue affects that too. In particular, (:REPORT "foo") defines a method that typically returns the string "foo", rather than the required condition object.
The section on Formatted Output almost reads as if ~A is supposed to ignore printer settings when printing strings ("If arg is a string, its characters will be output verbatim"); however, under this interpretation, ~S will also ignore those variables when printing strings, since it's specified as "just like ~A, but arg is printed with escape characters", while it is clearly desirable to honor printer settings in ~S. So, at least some clarification is needed here.
Consider the following code snippet.
(defparameter *separator* ",")The intended output is (# #). However, in at least one CL implementation, the output will be (# #), i.e., the printer will detect the shared structure and use sharpsign notation instead of printing the string verbatim. [Side note: There's no way to tell for sure where the printed representation of the object the #1= refers to ends, so the output is not very useful.] It's hard to argue that this output is non-conforming because of the wording in the description of ~S. So I don't think there's a way to write this print-object method without resorting to an explicit write-string (or copy-seq, but this will cons needlessly; or using a symbol, which is counter-intuitive). It's a pity format has this limitation.(defstruct foo (a 'a) (b 'b))
(defmethod print-object ((foo foo) stream) (print-unreadable-object (foo stream) (format stream "~A~A~A" (foo-a foo) *separator* (foo-b foo))))
(let ((*print-circle* t)) (print (list (make-foo) (make-foo))))
Issue PRINC-READABLY seems to be related to this.
I think that's a bad idea. DEFCONSTANT is only problematic for values that cannot be compared with EQL but only, for example, with EQUAL. This may lead to the situation that one wants to use, for example, constant strings, but everytime the respective DEFCONSTANT form is reevaluated an error is issued because two EQUAL strings are not necessarily EQL. Here is another proposal: Add a TEST keyword to DEFCONSTANT that allows programmers to specify how they intend to use the constant, i.e. under what equivalence semantics. In the case of string constants they can say, for example: (DEFCONSTANT +example+ "example" :test #'equal). The idea here is that this is a promise to the compiler that the rest of the program does not rely on the EQL identity of the value of +example+. In turn, if the value of +example+ is indeed changed to another value that is not EQUAL in a subsequent DEFCONSTANT form the compiler can issue a warning / error as before.
Options:
type arguments that do not name classes, like (or type-error program-error).#S(PATHNAME ...). It should be specified as such, instead of requiring #P"..." which is not always readable.Please put outright extensions (not fixups) in Proposed Extensions To ANSI.
Not clear if this is the right place for it, but minor (e.g. typographical) corrections to the CLHS:
This page is linked from: Issue SOME Proposed Extensions To ANSI
CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively