home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!homer.cs.mcgill.ca!news
- From: samurai@homer.cs.mcgill.ca (Darcy Brockbank)
- Newsgroups: comp.lang.objective-c
- Subject: Re: Objective-C vs. C++
- Message-ID: <1992Aug31.131044.5117@cs.mcgill.ca>
- Date: 31 Aug 92 13:10:44 GMT
- References: <20@seltd.UUCP>
- Sender: news@cs.mcgill.ca (Netnews Administrator)
- Reply-To: samurai@uriel.cs.mgill.ca
- Organization: SOCS, McGill University, Montreal, Canada
- Lines: 26
-
- In article <20@seltd.UUCP> lerman@seltd.UUCP (Kenneth Lerman) writes:
- > One objection to runtime dispatching of messages which is often made
- > by the C++ advocates is that you may get "doesNotRecognize" errors
- > during runtime if your code is not statically checked by the compiler.
- > My answer to this is:
- > You mean you don't test your code?
-
- If you want to be more strict, you can also define variables as:
-
- SomeClass *anObject;
-
- Instead of:
-
- id anObject;
-
- And this will allow the compiler to check at compile time whether
- or not "anObject" will respond to given selectors. (Unless the
- selectors are variables as well.)
-
- - db
-
- --
- -------
- I always thought that NeXTStep was very good in its approach to color since
- the tasteless are protected from their own stupidity. -- Jason Breckenridge
- (I know Jason, Jason is a close personal friend of mine, and I am not Jason!)
-