Article View: comp.lang.objective-c
Article #72Re: Objective-C vs. C++
From: Darcy Brockbank
Date: Mon, 31 Aug 1992 13:10
Date: Mon, 31 Aug 1992 13:10
26 lines
1401 bytes
1401 bytes
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!)
Technical Details
Message-ID:
<1992Aug31.131044.5117@cs.mcgill.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!hri.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!homer.cs.mcgill.ca!newsReferences:
<20@seltd.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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