[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $gensym
From: |
Robert Dodier |
Subject: |
Re: $gensym |
Date: |
Sun, 5 Nov 2023 10:12:39 -0800 |
On Sun, Nov 5, 2023 at 7:06 AM Camm Maguire <camm@maguirefamily.org> wrote:
> Greetings! Just to report that maxima's current use of $gensym (at
> least as of commit b6d66ad4e which is doubtless out of date by now)
> creates an implicit dependency on an unchanged *gensym-counter* binding,
> i.e. that the sequence of lisp gensym names are presented to $gensym in
> the conventional order. Should an implementation reset the outer
> binding of *gensym-counter*, this will generate test suite failures. I
> have a test case if anyone is interested. The ansi spec says
>
> *gensym-counter* can be either assigned or bound at any time, but its value
> must always be a non-negative integer.
>
> This is obviously not too important, and gcl will make sure to stay
> clear of this for maxima's sake.
I'm not sure Maxima should try to ensure that resetting
*GENSYM-COUNTER* doesn't cause trouble. Maxima doesn't otherwise work
with *GENSYM-COUNTER*, so there's no way for the user to reset it
without resorting to Lisp programming, and the conventional assumption
(not documented anywhere, I'm sure) is that you can do whatever you
want in Lisp, including making things go wrong -- I think
*GENSYM-COUNTER* falls under that.
What is the test case which shows Maxima gensym not working correctly?
Maybe it's serious enough after all.
best,
Robert
- $gensym, Camm Maguire, 2023/11/05
- Re: $gensym,
Robert Dodier <=