It seems that we are split on the issue of the behavior of toplevel variable
definition: Some want to punish the young user for imminent and inevitable
ruin and despair. Other's would like a warm and friendly approach that
recognizes his freedom to experience whatever life has to offer. (OK, that
might not be a balanced assessment!)
I'd settle for a one line warning. Currently it uses two lines. Not too bad.
It was my original intent to get comment on the relevance of what is printed,
and the number of lines used generally. Consider the following interactions
with cmucl, acl and lispworks. Here the released 18e version of Cmucl
responds with 22 lines. How much of this is relevant?
In comparison, lispworks uses 11 lines. ACL uses 10. In each of these lisps, 5
lines are devoted to restarts, and there are only two sections to the
response: the error report and the restarts.
Do you think that were cmucl to provide a response similar to theirs it would
be an improvement? Are there things we could do to emphasize cmucl's
strengths?
;;;----------------------------------------------
;;; CMUCL
* (defun xyz () abc)
XYZ
* (xyz)
;
; Warning: This variable is undefined:
; ABC
Error in KERNEL::UNBOUND-SYMBOL-ERROR-HANDLER: the variable ABC is unbound.
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(EVAL::LEAF-VALUE
#<C::REF #x480269FD
LEAF= #<C::GLOBAL-VAR #x480269D5 NAME= ABC KIND= :GLOBAL>>
0
#())
Source: Error finding source:
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer
exists:
target:compiler/eval.lisp.
0]
;;;------------------------------------------------------------
;;; Here is the same interaction in lispworks:
CL-USER 1 > (defun xyz () abc)
Warning: Syntactic warning for form ABC:
ABC assumed special.
XYZ
CL-USER 2 > (xyz)
Error: The variable ABC is unbound.
1 (continue) Try evaluating ABC again.
2 Specify a value to use this time instead of evaluating ABC.
3 Specify a value to set ABC to.
4 (abort) Return to level 0.
5 Return to top loop level 0.
Type :b for backtrace, :c <option number> to proceed, or :? for other options
CL-USER 3 : 1 >
;;;-----------------------------------------------------
;;; And here it is in ACL...
USER(1): (defun xyz () abc)
XYZ
USER(2): (xyz)
Error: Attempt to take the value of the unbound variable `ABC'.
[condition type: UNBOUND-VARIABLE]
Restart actions (select using :continue):
0: Try evaluating ABC again.
1: Set the symbol-value of ABC and use its value.
2: Use a value without setting ABC.
3: Return to Top Level (an "abort" restart)
4: Abort #<PROCESS Initial Lisp Listener>
[1] USER(3):
--
Best Regards,
- Peter
Peter Denno
National Institute of Standards and Technology,
Manufacturing System Integration Division,
100 Bureau Drive, Mail Stop 8264 Tel: +1 301-975-3595
Gaithersburg, MD, USA 20899-8264 FAX: +1 301-975-4694