gendl icon indicating copy to clipboard operation
gendl copied to clipboard

Move slots to their most appropriate class definition

Open reiniervandijk opened this issue 11 years ago • 2 comments

It doesn't seem to make a lot of sense to have these two slots in the vanilla-mixin* definition:

   (%corners% nil)
   (%vertex-array% nil)

Would've expected those slots in base-object. I think it qualifies as an issue, a logically designed language is imperative. These two slots don't follow that cause.

reiniervandijk avatar Oct 10 '13 16:10 reiniervandijk

These were put there for a reason - they are the minimal placeholders in vanilla-mixin to avoid crashing of tasty if you try to include a non-geometric object in the display-list. But you are right, it's not a clean way to do it. We'll make tasty smarter about what it tries to do with non-geometric objects in display list, and remove these slots from here.

genworks avatar Oct 26 '13 02:10 genworks

I understand the purpose of these slots, but if they are abstract slots and merely templates for subclasses that are supposed to be overridden, consider maybe to use:

   (%corners% *undefined*)
   (%vertex-array% *undefined*)

or:

   (%corners% (error "gendl: not implemented, should be overridden in subclasses.")
   (%vertex-array% (error "gendl: not implemented, should be overridden in subclasses.")

or add a slot:

(%drawable?% nil)

That you put to true on subclassing.

reiniervandijk avatar Nov 01 '13 07:11 reiniervandijk