From: SourceForge.net <no...@so...> - 2005-09-06 18:05:43
|
Bugs item #1282492, was opened at 2005-09-06 00:43 Message generated for change (Settings changed) made by leeaaa You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1282492&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: clisp Group: ANSI compliance issue >Status: Closed Resolution: Invalid Priority: 5 Submitted By: Sergey Pavlov (leeaaa) Assigned to: Sam Steingold (sds) Summary: write function don't binds all print-variables Initial Comment: I think following code should unbind *print-length* after exiting from "write" and print 10, but actually CLISP prints 50. I have tested it with LispWorks - that implementation binds/unbinds all *print-* vars to their value if key argument absent. That logic better, because it protects vars from changes inside a custom print- object functions (defclass c () (f)) (defmethod print-object ((x c) s) (setq *print-length* 50) (print "print-object")) (progn (setq *print-length* 10) (write (make-instance 'c) ) (print *print-length*) ) ---------------------------------------------------------------------- >Comment By: Sergey Pavlov (leeaaa) Date: 2005-09-06 23:05 Message: Logged In: YES user_id=315000 Yes, I agree with you. I just seen CMU-CL's "write" implementation before: ============================== (defun write (object &key ((:escape *print-escape*) *print- escape*) ((:radix *print-radix*) *print-radix*) ... =============================== but now I think it is because simplest method to implement "write" on Lisp language. To selective bind it is necessary to use "PROGV" form, which produces many conses. Thanks for answer. ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2005-09-06 22:28 Message: Logged In: YES user_id=5735 note that it does not make any sense to require binding for non-supplied keyword parameters: that does not affect the relevant behavior while increasing the stack use, which is especially important given the highly recursive nature of the lisp printer ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2005-09-06 22:28 Message: Logged In: YES user_id=5735 This bug report is now marked as "pending"/"invalid". This means that we think that the problem you report is not a problem with CLISP. Unless you - the reporter - act within 2 weeks, the bug will be permanently closed. Sorry about the inconvenience - we hope your silence means that you agree that this is not a bug in CLISP. ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2005-09-06 02:02 Message: Logged In: YES user_id=5735 I do not see a requirement that the non-supplied keyword parameters effect a binding: http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html For each explicitly supplied keyword parameter named in the next figure, the corresponding printer control variable is dynamically bound to its value while printing goes on; for each keyword parameter in the next figure that is not explicitly supplied, the value of the corresponding printer control variable is the same as it was at the time write was invoked. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1282492&group_id=1355 |