Issue PRINTING-ARRAYS-READABLY
Issue: PRINTING-ARRAYS-READABLY

Forum: Editorial

References: *PRINT-READABLY*, CLHS 22.1.3.7, CLHS 22.1.3.8

Category: CLARIFICATION/CHANGE

Edit history: 2004-07-20, Version 1 by Bruno Haible

Status: For CLiki consideration

Problem Description:

The description of *PRINT-READABLY* says that throwing a PRINT-NOT-READABLE error is allowed for certain arrays. CLHS 22.1.3.7 seems to imply that no error is allowed. This should probably be clarified one way or the other.

Proposal (PRINTING-ARRAYS-READABLY:NO-ERROR):

Add a sentence to 22.1.3.7: "If *print-readably* is true ... Any vector can be printed readably without signaling an error of type PRINT-NOT-READABLE if all its elements can be printed readably without signaling an error of type PRINT-NOT-READABLE." And similarly to 22.1.3.8: "If *print-readably* is true ... Any array can be printed readably without signaling an error of type PRINT-NOT-READABLE if all its elements can be printed readably without signaling an error of type PRINT-NOT-READABLE."

Test case:

(write (make-array '(3 0 5) :element-type '(unsigned-byte 8)) :readably t)

Rationale:

The implementation should ensure that it can print arrays readably.

Current practice:

CLISP supports proposal NO-ERROR. SBCL doesn't.

Cost to Implementors:

Define a way to print arrays readably, including when the element-type is not t, or when one of the dimensions is 0.

Cost to Users:

None.

Cost of Non-Adoption:

*PRINT-READABLY* is less useful.

Benefits:

Makes *PRINT-READABLY* more useful.

Aesthetics:

Discussion:
  • Bruno Haible supports proposal NO-ERROR.

This page is presently Uncategorized: please add appropriate topic markers and remove this text