Re: Bug report

Tim Daly <[email protected]> Tue, 22 Oct 2019 18:22:17 -0400
Newsgroups gmane.lisp.clisp.general
Message-ID <CAJn5L=KjsF1dw1LQ2qy56YfFydn7JOg59UwyVAqy612WuCcc7g@mail.gmail.com>
Ok, just so you know... I've been coding in lisp for 50 years,
starting with a lisp implementation Lisp 1.5 (in assembler)
of McCarthy's original definition. I've contributed code for
GC and tail recursion for AKCL (GCL). I helped review the
X3J13 preliminary reports. I've built whole languages for
IBM (ECLPS and KROPS) in Common Lisp. I helped port
Axiom (1.2 million lines of code) from MACLISP and
LISP/VM to 8 different common lisp implementations.

While it is perfectly reasonable to create a funciton on
the :arglist symbol it seems to me that exposing that
function (however it got defined) in the CL-USER package
in a "clean" image is a bug.

As a matter of code quality I normally run my code in
multiple implementations so I uncover any odd behavior
I need to "work around". The :arglist funciton is "odd behavior".
It does not occur in any other lisp. Although I appreciate
the tutorials, I know how to work around it.

As Brumo pointed out, this function is gone in later images.
It is, however, in the debian distribution version.

Also, as a habit, I report what I feel are bugs. Obviously
not everyone agrees with my opinion. That's fine.

I will build the latest CLISP  image from scratch.

Sorry for the noise.

Tim Daly



On 10/22/19, C Habs <[email protected]> wrote:
> On Tue, 22 Oct 2019 at 12:31, Matthias Lindner
> <[email protected]>
> wrote:
>
>> Hi,
>>
>>
>> I think there is some confusion here, as the initial code given, was not
>> exactly the one that is causing the issues.
>>
>
> What is the confusion.  This is the reported 'failing' code:
>
> (defclass test () ((arglist :accessor :arglist)))
>
> And that code entered into the REPL on a CLISP 2.49, does not throw any
> error as I commented early on.
>
> Therefore, it does seem to be something else, somewhere, conflicting.
> Whether that is due to changes in CLISP between 2.40 to 2.49 (which would
> be surprising if so), or due to some 'imported' code as a result of library
> load etc is what I think previous respondees have tried to guide on as a
> reason for the failure.
>
> Or have I understood it wrong ?
>
>
>
>>
>> Tim, I think what you are trying to do is not (defclass foo () ((a
>> :accessor *:*arglist)))but (defclass foo () ((a :accessor arglist))),
>> i.e. you are trying to create a generic accessor function fbound to
>> 'arglist and not to :arglist.
>>
>> If this is the case, then this fails, as #'ext:arglist is imported in
>> CL-USER, which makes a lot of sense, as it is used to determine the list
>> of arguments accepted by any function.
>>
>> A possible fix here is, if you really insist on redefining #'arglist in
>> CL-USER, to shadow the symbol:
>>
>> [1]> (defclass foo () ((a :accessor arglist)))
>>
>> *** - DEFMETHOD: ARGLIST does not name a generic function
>> The following restarts are available:
>> ABORT          :R1      Abort main loop
>> Break 1 [2]> :q
>> [3]> (shadow 'arglist)
>> T
>> [4]> (defclass foo () ((a :accessor arglist)))
>> #<STANDARD-CLASS FOO>
>> [5]> #'arglist
>> #<STANDARD-GENERIC-FUNCTION ARGLIST>
>> [6]> #'ext:arglist
>> #<COMPILED-FUNCTION EXT:ARGLIST>
>> [7]>
>>
>> Cheers
>>
>>
>> --Matthias
>>
>>
>>
> Again, I am not sure why the above is relevant if  2.40 and 2.49 CLISP have
> not varied, other than something somewhere  is being loaded after starting
> CLISP and is introducing an error on the reported code: (defclass test ()
> ((arglist :accessor :arglist)))
>
> Of course, my comments are made without the full appreciation of all the
> code involved.
>
> Regards
> Habs
>
> _______________________________________________
> clisp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/clisp-list
>


_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list