core-lisp icon indicating copy to clipboard operation
core-lisp copied to clipboard

defclass doesn't implement :abstractp

Open poldy opened this issue 5 years ago • 3 comments

According to the spec, the following code should work:

(defclass <expr> () () (:abstractp t))

however when I try this under core-lisp/SBCL I get the following error:

debugger invoked on a SB-PCL::INITARG-ERROR in thread
#<THREAD "main thread" RUNNING {10005084C3}>:
  Invalid initialization argument:
    :ABSTRACTP
  in call for class #<STANDARD-CLASS COMMON-LISP:STANDARD-CLASS>.

poldy avatar Nov 19 '19 23:11 poldy

I'll look into it. Normally in CL if you want an abstract class you would define an abstract-class metaclass, but I see in the spec that the :metaclass and :abstract options are orthogonal, so it would probably have to be handled in create instead.

ruricolist avatar Nov 20 '19 00:11 ruricolist

Would it be helpful if, for the moment, I added no-op parsing for the :abstract keyword, or do you really need an abstract class?

ruricolist avatar Nov 20 '19 21:11 ruricolist

That would be helpful. It's really just for porting some code from Christian Jullien's OpenLisp so although it would be nice to enforce, just parsing is still a big help.

poldy avatar Nov 20 '19 22:11 poldy