On 10/7/07, MenTaLguY <mental / rydia.net> wrote: > On Mon, 2007-10-08 at 01:12 +0900, Pat Maddox wrote: > > Here's something off the top of my head, that allows you to reason > > about "types" without needing MI. > > > > module LinuxApplication; end > > module VideoApplication; end > > module WindowsApplication; end > > > > class LinuxVideoApplication > > include LinuxApplication > > include VideoApplication > > end > > > > class WindowsVideoApplication > > include WindowsApplication > > include VideoApplication > > end > > > > def only_linux_video_please(app) > > raise "Must be a LinuxVideoApplication" unless LinuxApplication === > > app && VideoApplication === app > > end > > I'm not sure this is a particularly good example; it's based off of > Trans' example, not Sylvain's, and it also does use multiple inheritance > inasmuch as modules amount to restricted MI. > > -mental > > Well, neither one gave examples, afaik, and I think this whole thing is kind of stupid. I have a feeling that when these guys post their examples, people will show them much better ways to design their code, so I wanted to get the ball rolling. Pat