From: Walter Prins Date: 2006-01-26T20:37:55+09:00 Subject: Re: [ruby-talk] Class is object? :very_sleepy consider a class as a "blueprint object"... problem solved. Remember, in OO "everything" is an object. But just because everything is an object, does not mean they're the *same* (or even similar.) A class is rather different to instances of classes (which we call objects with a slightly different emphasis) for sure, but if you step away far enough you can still call them _both_ objects in a more general sense. So "a class" is-a "object", but in a more general sense. You can make the same argument about methods and many other things. To me it's a subtle shift of perspective, and indeed *more* OO than languages where you *don't* have the notion of treating most things as an object... My �0.02 anyway Alex Combas wrote: >Was just thinking today, earlier, but at the moment >I'm not reallly thinking, I'm mostly asleep right now, >so probably shouldnt be writing, let alone typing, and >especially not with this much Nightquil chugging though me.. > >BUT OK!! >TITLE: Class are objects!?! >Here is my question: Does having class variables (@@) and >class methods (MyClass.foo) destroy the whole OO design concept? >I've always thought of classes like blueprints, and objects like, well, objects >made from the blueprints. So thinking of classes as objects themselves >that have :attributes, @@variables, and def methods kind of wrecks >my "blueprint" metaphore. > >I know I'm wrong, I probably should have wrote that at the top in >big green letters. I just want to throw this out and see just how many >ways I can be proven wrong so that I can learn and maybe >one of the ways will stick like a wet noodle on the wall of my brain >for long enough that I dont have to ask this question again next week. > >What I would really like is a better metaphore for class! >Thanks! > >-- >Alex Combas >http://noodlejunkie.blogspot.com/ > > > >