[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ARGUMENTS-UNDERSPECIFIED



 From:	DECWRL::MAILER-DAEMON "Mail Delivery Subsystem  19-Sep-88 0713 PDT" 19-SEP-1988 10:13:04.80
To:	37.975::chapman
CC:	
Subj:	Returned mail: Host unknown

   ----- Transcript of session follows -----
mail11: no host entry for sail-stanford-edu
550 cl-cleanup@sail-stanford-edu... Host unknown
 
   ----- Unsent message follows -----
Received: by decwrl.dec.com (5.54.5/4.7.34)
	id AA03664; Mon, 19 Sep 88 07:13:18 PDT
Message-Id: <8809191413.AA03664@decwrl.dec.com>
 From: chapman@37.975.enet
Date: 19 Sep 88 10:11
To: cl-cleanup@sail-stanford-edu
Subject: ARGUMENTS-UNDERSPECIFIED
 
Issue:        ARGUMENTS-UNDERSPECIFIED
References:   LOGBITP (p 224), MAKE-DISPATCH-MACRO-CHARACTER (p 363), 
	      MAKE-HASH-TABLE (p 283), MAKE-SEQUENCE (p 249), READ (p 375)
     	      MAKE-STRING (p 302), NTHCDR (p 267), PARSE-INTEGER (p 381),
	      SET (p 92)
Category:     CLARIFICATION
Edit history: 26-Aug-88, Version 1 by Chapman
	      4-Sep-88, version 2 by Masinter
	      19-Sept-88, Version 3 by Chapman
 
Problem Description:
 
The descriptions of LOGBITP, MAKE-DISPATCH-MACRO-CHARACTER, READ, SET,
MAKE-HASH-TABLE, MAKE-SEQUENCE, MAKE-STRING, NTHCDR, and PARSE-INTEGER 
are not clear about the types of the arguments supplied to these 
constructs.
 
Proposal (ARGUMENTS-UNDERSPECIFIED:SPECIFY)
 
Clarify that the arguments for the listed constructs are as follows:
 
Construct			Argument	Type
LOGBITP 			index		non-negative integer
MAKE-DISPATCH-MACRO-CHARACTER 	char		character
MAKE-HASH-TABLE			size	 	non-negative integer
MAKE-SEQUENCE	     		size		non-negative integer
MAKE-SEQUENCE	     		type		type specifier
MAKE-STRING			size            non-negative integer
MAKE-STRING			initial-element	string-char
NTHCDR 				n		non-negative integer
PARSE-INTEGER 			start,end       non-negative integers
PARSE-INTEGER 			start,end       non-negative integers
SET-SYNTAX-FROM-CHAR		to-char,from-char
						characters
READ and others			eof-value	any value
SET				value		any value
 
(MAKE-HASH-TABLE, MAKE-SEQUENCE, MAKE-STRING have additional constraints on
their respective SIZE arguments; for example, MAKE-STRING may detect an error if
SIZE is greater than or equal to ARRAY-DIMENSION-LIMIT. PARSE-INTEGER may
detect
an error if the START or END arguments are  not in the range of the "string"
argument.)
 
Rationale:
 
This clarification allows predictible results to occur when 
arguments are supplied to these constructs.
 
Current Practice:
 
Cost to Implementors:
 
None, since this is consistent with current practice.
 
Cost to Users:
None, since this is consistent with current practice.
 
Benefits:
 
This clarification will assist users in writing portable code.
 
Aesthetics:
 
The standard would be less clean were the allowed ranges of its functions not
specified.
 
Discussion:
KMP believes the END argument to PARSE-INTEGER should be permitted to be
NIL, meaning use the rest of the string.  This is most convenient from
an implementation point of view because one can write
 
 &KEY (START 0) (END NIL)
 
If you say the argument must be an integer, you must write:
 
 &KEY (START 0) (END NIL END-P)
 
and complain if END is NIL while END-P is T (which seems gratuitous
error checking since the functionality would be useful) or else you must
do
 
 &KEY (START 0) (END (LENGTH STRING))
 
which is also gratuitous since the function will not be certain that the
value of END is correct and will have to do (LENGTH STRING) yet again in
order to validate the value of END.
 
KMP believe an analogous criterion should be applied to END arguments
across the board. and is writing this up
as a separate cleanup item.
 
Van Roggen concurs.
 
========================================================================
Received: by decwrl.dec.com (5.54.5/4.7.34)
	id AA03720; Mon, 19 Sep 88 07:13:18 PDT