> * Christophe Rhodes <[EMAIL PROTECTED]> [2004-11-13 21:53:17 +0000]:
>
> On Sat, 13 Nov 2004, Sam Steingold wrote:
>
>>> * Rahul Jain <[EMAIL PROTECTED]> [2004-11-13 13:11:54 -0500]:
>>>
>>> For some structures, you may store open streams to files in their
>>> slots.  How is making a load form for that simple? Maybe you want to
>>> have MAKE-LOAD-FORM re-open the file with the same name when the
>>> structure is reloaded or maybe you want it to lookup the name from
>>> some configurable variable. Do you expect MAKE-LOAD-FORM-SAVING-SLOTS
>>> to figure this out by itself?
>>
>> this argument applies equally well to lists and vectors.
>> should lists and vectors be non-externalizable just because they may
>> contain open streams?
>
> No.  Lists or vectors which happen to contain open streams are not
> externalizable as literals because they contain open streams.
> However, it is possible to define semantics for user-defined
> structures (but not for built-in-types or structures in complete
> generality) to save literals which happen to have open streams in
> slots, if reasonable semantics can be defined by the programmer.  The
> globally correct semantics cannot be done for lists or vectors.

this is a complete non-sequitur.
if a list (or a user-defined structure) contains a non-externalizable
object (like an open stream), it is non-externalizable.
if it only contains externalizable objects (e.g., numbers), it is
externalizable too.

if the user wants to make structure with stream slots externalizable,
he can do that (yes, he cannot do it for lists of streams - so what?),
but this is not a good reason to make #S(FOO :A 10) non-externalizable.

The bottom line here is that CMUCL (and probably SBCL too) is the only
CL I know of which does not externalize #S(FOO :A 10).
Even though CLtS does not _require_ you to do that,
I don't think it prevents you from doing that.
At any rate, this is useful functionality which cannot hurt.

Since it is easy to work around (see CLOCC/CLLIB/base.lisp),
this is not a blocker,
but I don't see any reason not to support this OOTB.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
I'd give my right arm to be ambidextrous.


Reply via email to