home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!richsun!richsun.cpg.trs.reuter.com
- From: jack@richsun.cpg.trs.reuter.com (Jack Gidding)
- Newsgroups: comp.lang.objective-c
- Subject: Re: why no class variables?
- Message-ID: <3937@richsun.cpg.trs.reuter.com>
- Date: 25 Jan 93 15:26:36 GMT
- References: <1993Jan22.133837.13502@news.media.mit.edu>
- Sender: news@richsun.cpg.trs.reuter.com
- Lines: 39
-
- In article <1993Jan22.133837.13502@news.media.mit.edu>
- wave@media.mit.edu (Michael B. Johnson) writes:
- > Hi folks. For a project I've been doing for some time now, I need
- to keep
- > some state info in the Class of a given object. I'm annoyed by the
- fact
- > that I can't add instance variables to a Class object, and have to
- "simulate"
- > them with static variables. Off the top of my head, I don't
- understand this
- > restriction. Can someone out there convince me that this is a
- necessary
- > and proper restriction?
- >
-
-
- I wholeheartedly agree! I think that these are necessary as well.
- Class variables are important for doing things exactly as you
- mentioned.
-
- I have the same problem. I set up some initialization for a class
- when the first one is created. By faking the class variables with
- static variables means that I have to restrict my subclassing. Grrr.
-
- For me, I need the static variables for time optimization. I look up
- function references and store them. Its a long story, but its a
- necessary optimization in our real-time system.
-
- ---
- Jack Gidding Sr. Development Engineer
- Reuters 1400 Kensington Road Oak Brook,IL 60521
-
- jack@richsun.cpg.trs.reuter.com NeXT mail welcome!
- -----------------------------------------------------------
- "Credit is a euphemism for debt." - Billy McKenzie
-
-
-
-
-