home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / objectiv / 502 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.3 KB

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