::scr usability, languages and apis

simon wistow scr@thegestalt.org
Thu, 15 Nov 2001 17:54:45 +0000


On Thu, Nov 15, 2001 at 05:57:18PM -0000, Simon Kinahan said:
> Hmm. Looking at the class hierarchy below, it is not one I would recommend
> to anyone. Something is clearly wrong with it because you've got
> ScrollingTile and ScrollingSprite as unrelated classes. Now, I don't know
> whether tiles and sprites scroll the same way or different ways, but at the
> very least they need to implement a common interface called, say,
> Scrollable.

This, I think is exactly the case. I'm in two minds about multiple inheritance
- sometimes I think that if you need to have multiple inheritance then often
you've designed your APIs wrong ... other times I think it's the greatest
thing since sliced bread :

A horse should extend mammal and moveable
A car should extend manmade and moveable
A hosue should extend manmade and immoveable

Unofortunatley I'm not in the position to go munging the API which wouldn't
necessarily be a good thing because then other people lose familiarity. Sigh.

I've never really found a good explanation of Aspect Orientated Programming.




-- 
:  everything after here is irrelevant