Thread View: comp.sys.ti.explorer
3 messages
3 total messages
Started by RICE
Wed, 06 Sep 1989 18:45
CL compatibility.
Author: RICE
Date: Wed, 06 Sep 1989 18:45
Date: Wed, 06 Sep 1989 18:45
75 lines
2861 bytes
2861 bytes
Hello everyone, I just thought that I'd send a note to see if anyone else has had similar experiences to me concerning CL compatibility on Explorers or has any opinions on this matter. I've noticed two main symptons: a) The default value for sys:*inhibit-displacing-flag* is nil. This means that when you eval an expression that expression might be side effected as a result of macroexpansion/displacement. (defmacro foo (x) `(print ,x)) (setq bar '(print (foo 42))) (print bar) -> (PRINT (FOO 42)) (eval bar) -> 42 42 42 (print bar) -> (PRINT (SYS:DISPLACED (FOO 42) (PRINT 42))) !!!!!! This is a good optimisation feature since it makes the interpreter faster and reduces consing but it is definitely non CL. I got severely burned by this recently (I almost never interpret anything and found this in someone elses code). It took a long time to find the problem since I found it hard to believe that EVAL could be the thing that was trashing my data. I mentioned this problem to the chaps who turned up at IJCAI and a number of them had been burned similarly by this one. b) I have noticed on a number of CL implementations that they are strict with respect to the number of colons you use for symbols. Only yesterday did I discover the existence of sys:*restrict-internal-symbols*, which has a default value of Nil, even though CL would make you think that it should be T. (read-from-string "tv:foo") -> TV::FOO (let ((sys:*restrict-internal-symbols* t)) (read-from-string "tv:foo")) The symbol "FOO" is not external in the package #<Package TV 3723217> -> TV:FOO Neither of these magic variables are in the Profile tool. That's the main reason why I had never discovered them, I think. My point is that, even though there is a Lisp package, using which one can theoretically build portable CL programs, there are a number of other system level flags that affect the semantics of the CL and there is no coherent way to set a global switch to ensure CL behaviour in one's program. This is likely to become even more of a problem since the greater state of development and availability of TI's other CL standard stuff (CLOS/CLX/CLUE/CLCS) in release 6 means that one is more likely to want to use TI machines for the development of large portable CL systems. I think that not having the default system behaviour being strict CL is a major bug. Does anyone else have any opinion on this one? Rice.
Re: CL compatibility.
Author: Brad Miller
Date: Thu, 07 Sep 1989 16:33
Date: Thu, 07 Sep 1989 16:33
20 lines
1271 bytes
1271 bytes
Date: Wed, 6 Sep 89 11:45:53 PDT
From: RICE@sumex-aim.stanford.edu
This is likely to become
even more of a problem since the greater state of
development and availability of TI's other CL standard
stuff (CLOS/CLX/CLUE/CLCS) in release 6 means that
one is more likely to want to use TI machines for the
development of large portable CL systems.
CLUE is a standard? How about CLIM then?
I think that not having the default system behaviour
being strict CL is a major bug. Does anyone else have
any opinion on this one?
I don't know about "major" bug, but I certainly think there should be a very
easy way to be "standard conformant", e.g. a fn that sets all the right
switches or some such.
CL compatibility.
Author: Dan Cerys
Date: Mon, 11 Sep 1989 20:00
Date: Mon, 11 Sep 1989 20:00
28 lines
1718 bytes
1718 bytes
b) I have noticed on a number of CL implementations that they are strict with respect to the number of colons you use for symbols. Only yesterday did I discover the existence of sys:*restrict-internal-symbols*, which has a default value of Nil, even though CL would make you think that it should be T. I think that not having the default system behaviour being strict CL is a major bug. Does anyone else have any opinion on this one? I'll also agree with Rice on this. CLtL sez that the reader should signal a correctable error when foo:bar (where BAR in an internal symbol of FOO) is read. It shouldn't be necessary to set some obscure variable (is it even documented?) to get this standard CL behavior. The current Explorer behavior was handy for conversion of Zetalisp programs, but I think we've gone beyond that. Change the default value to support Common Lisp properly. If Zetalisp is still important to some users (I would expect there are some), you may want to be ambitious and provide the external-symbol check on a per-package basis, as an attribute of the package. I believe another Lisp vendor does something like this. Of course, if you do this, make the default to be to enforce what CL specifies. Dan
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads