Build problem? constant literal lists?



In article 
<8b356f880705041504v20b8fcf8s3769531d79afaf39 at mail.gmail.com>,
 "Stavros Macrakis" <macrakis at alum.mit.edu> wrote:

> On 5/4/07, Rainer Joswig <joswig at lisp.de> wrote:
> >
> > Maxima 5.12.0
> >
> > While we are at it, has anybody checked whether the
> > use of constant lists is safe in Maxima?
> >
> 
> I don't believe this should be a problem, and it has always been considered
> poor style to modify constant lists.
> 
> If I remember correctly, the compiler of the MacLisp implementation under
> which Maxima was originally implemented canonicalized all constant lists,
> not only defvar's but inline constant structures, so that (eq '(a b) '(a b))
> would be true (but was not guarateed to be true).  I am not sure whether
> this was done when generating binary (fasl) files or when loading binary
> files, so I am not sure if they were unique across all loaded units, or just
> within a given compilation unit.
> 
> So this is reason to believe that we do not have this problem.
> 
> Do you have any reason to believe that we *do* have this problem?

Not really. I was seeing a few errors and I was a bit nervous
whether it was something more fundamental. I saw a few literal
lists in the source and was just asking myself if that could
be a trouble maker (since I have seen similar problems in
other Lisp code). I also looked at some place where these lists
were used, but it was not obvious what happens to them and if
all use is non-destructive. That's just from looking a few minutes
at the source. But I didn't want to experiment around,
so I asked here ,if it would be a possibility that those could be
a source of problems. After restarting the Lisp and recompiling
the sources, most of the errors were gone anyway...
 
> Is there a Lisp implementation that can detect this at runtime (detecting it
> statically is in general impossible of course)?  Of course, there's no
> guarantee that any particular set of tests would exercise the bad cases.

Unfortunately I don't believe that there is anything like that.
That's a reason I find this Common Lisp 'feature' a bit problematic. 

> 
>            -s
> ---------------------------------------------------------------------
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima

-- 
http://lispm.dyndns.org