genworks / gendl

Archive of old version, visit gendl.org for current version --- #gendl on libera.chat
http://www.gendl.org
GNU Affero General Public License v3.0
57 stars 5 forks source link

Move slots to their most appropriate class definition #143

Open reiniervandijk opened 10 years ago

reiniervandijk commented 10 years ago

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.

genworks commented 10 years ago

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.

reiniervandijk commented 10 years ago

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.