| No, Robert. Class variables are not analagous to class methods, strange as it may seem. It's also considered bad design form to use them unless you must – and you rarely must. (I did cover them in class, Jared.) Mark Guzdial |
| I thought you said in class that we wouldn't be covering them because they were beyond the scope of this class. Hmm, maybe I was a little too sleepy that dya. Jared Parsons |
| Jared, you're right that I did say that they weren't going to be covered in the course (is the comment about "scope" a pun? :-), but I did give the basic definition that Christopher just did. (Or so I recall. Sometimes, my last seven years of teaching 2390/2340 run together on me...:-) Mark Guzdial |
| A puzzle for advanced study: There actually aren't any "class" methods – that's just a distinction that the Browser makes for you. All methods are instance methods, and since all objects in Squeak are an instance of some class, "class" methods are just method that your class (as an instance) understands. But in what class are they defined? For example, if Box the class understands "new" the class method, but that's just an instance method, in what class is Box's "new" defined? Mark Guzdial |