axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] PATCH : retrieval of Stream from a KAF file


From: Vanuxem Gregory
Subject: Re: [Axiom-developer] PATCH : retrieval of Stream from a KAF file
Date: Fri, 17 Nov 2006 22:32:36 +0100

Le vendredi 17 novembre 2006 à 22:29 +0100, Vanuxem Gregory a écrit :
> Le vendredi 17 novembre 2006 à 21:50 +0100, Waldek Hebisch a écrit :
> > > Hello,
> > > 
> > > Here is a small patch that fixes the incorrect retrieval of some Streams
> > > from a KAF file. It replaces 'EQ' by 'EQUAL' for comparisons of strings.
> > > There are some other unmodified uses of EQ in this file. They need
> > > further investigations and in particular I need to look at what I
> > > consider a big issue : equality with object of type 'Any' (I postponed
> > > my work on Stream).
> > > 
> > > --- src/algebra/stream.spad.pamphlet.old  2006-11-17 16:59:13.000000000
> > > +0100
> > > +++ src/algebra/stream.spad.pamphlet      2006-11-17 17:24:39.000000000 
> > > +0100
> > > @@ -647,8 +647,8 @@
> > >  
> > >      Rep := Record(firstElt: S, restOfStream: %)
> > >  
> > > -    explicitlyEmpty? x == EQ(frst x,NullStream)$Lisp
> > > -    lazy? x            == EQ(frst x,NonNullStream)$Lisp
> > > +    explicitlyEmpty? x == EQUAL(frst x,NullStream)$Lisp
> > > +    lazy? x            == EQUAL(frst x,NonNullStream)$Lisp
> > >  
> > >  --% signatures of local functions
> > >  
> > > 
> > 
> > That looks strange for me. NullStream and NonNullStream should be
> > unique objects, so I would probably turn them into symbols.  Your
> > change would make a one element list:
> 
> This is because NullStream and NonNullStream are globales variables
> (NullStream is a macro (NullStream ==> $NullStream$Lisp)) but when you
> store a Stream and retrieve it a new string is created and therefore
> these strings do not share their memory locations. I do not understand
> why you say "Your change would make a one element list", they are just
> strings.

I forgot (not the first time) that equal return t or nil so there is no
'["NonNullStream"]'.

Sorry,

Greg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]