CLIM mail archive
[Prev][Next][Index][Thread]
STREAMP and CLOS
Date: Tue, 25 Feb 1992 03:39 EST
From: Stefan Bernemann <berni@iml.fhg.de>
Date: Mon, 24 Feb 1992 20:49 MET
From: York%Chuck-Jones.West.Dialnet.ILA.COM@fhg.de (William M. York)
Date: Mon, 24 Feb 1992 08:25 PST
From: barmar@think.com (Barry Margolin)
Date: Mon, 24 Feb 1992 12:51 EST
From: bwild@azurro.fzi.de (Bernd Wild)
We got a surprising result when applying STREAMP to an arbitrary CLOS
instance. It always returns T. This behavior has changed from Genera
8.0 to 8.1. While in 8.0 only "real" streams resulted in a T-value in
8.1 this can be observed for every instance.
I can't reproduce this. I did
(clos:defclass foo () ())
(setq a (clos:make-instance 'foo))
(streamp a) => NIL
(send a :which-operations) => (:SEND-IF-HANDLES :WHICH-OPERATIONS :OPERATION-HANDLED-P :PRINT-SELF)
I'm running Genera 8.1.1, in case you're running plain 8.1. I don't
think it should make a difference, though; none of the CLOS patches in
the ECO seem to relate to this.
Gack! This surprising behavior can be obtained simply by loading
CLIM! Bern, are you trying this in an environment with CLIM 1.0
loaded?
I'm running clim 1.0 under genera 8.1
No real suggestions for a fix, but the implementation of the method
STREAM-WRITE-CHAR on the class T seems arguable: calling
(clim:stream-write-char (clos:make-instance 'foo) #\x)
runs into an infinte loop on the symbolics.
Genera's stream implementation predates the rest of the stream
implementations in the world by several years. I hesitate to call it
a stream "system", because it really just accreted slowly over the
years and does not implement any reliable protocol. With the advent
of CLIM, Genera uses *four* different object systems to implement
streams: structures, Old Flavor-like streams, New Flavor streams,
and CLOS-based streams.
What this means in real money is that CLIM has no choice but to write
some stream methods on the class T, because there is no other place to
hang them. What Moon proposed is probably the right fix: default
methods shouldn't cause STREAMP to return T.
Using clim on the Macintosh under MCL 2.0b4, calling STREAM-WRITE-CHAR with the same arguments
results in a "reasonable" error message saying STREAM-TYO is not applicable.
Guessing from the disassembled code of the method STREAM-WRITE-CHAR on the class T
the method basically calls STREAM-TYO on the arguments, and there is no
method for STREAM-TYO on class T (which is ok).
Follow-Ups:
- STREAMP and CLOS
- From: "William M. York" <York@chuck-jones.west.dialnet.ila.com>
References:
Main Index |
Thread Index