home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / object / 5069 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.5 KB  |  68 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!destroyer!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!news
  3. From: burchard@horizon.math.utah.edu (Paul Burchard)
  4. Subject: Re: Pros and cons of C++
  5. Message-ID: <C1JL1y.DHy@news2.cis.umn.edu>
  6. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  7. Nntp-Posting-Host: dialup-slip-1-42.gw.umn.edu
  8. Organization: University of Minnesota
  9. References: <1993Jan26.145454.21534@midway.uchicago.edu>
  10. Date: Thu, 28 Jan 1993 02:17:54 GMT
  11. Lines: 55
  12.  
  13. In article <1993Jan26.145454.21534@midway.uchicago.edu> dave@alex.uchicago.edu  
  14. (Dave Griffith) writes:
  15. > In article <C1G9H4.HsA@unix.portal.com> samantha@shell.portal.com (Samantha Atkins) writes:
  16. > >No object language I am aware of does a message based much less a decent
  17. > >semantic based check.  So in what way has safety been assured really?
  18. >
  19. > What I want to see, is a language 
  20. > where protocols and implementations are definable independently.  Protocols
  21. > may for a heirarchy by subtyping, implementations form a heirarchy by
  22. > inheritance.  Inherita 
  23. nce can thus be just a form of code-sharing, possibly
  24. > not the only such form in the language.
  25.  
  26. You're in luck---you've just described Objective-C.  It supports Protocols, which provide both compile-time and run-time type-checking, verifying that an object or class implements a designated set of messages.  Protocols can incorporate ("inherit") any number of parent Protocols, while the class hierarchy (implementations) does not support multiple inheritance.
  27.  
  28. Someone wrote to this newsgroup a few weeks ago about a project he was working on to add what he called ``signatures'' (essentially the same thing) to C++.  While C++ needs new features like Minneapolis needs cold weather, this seems like a good idea.
  29.  
  30. (Note: Protocols aren't yet available in the current version of
  31. GNU Objective-C; NeXT's latest changes haven't been folded in yet.)
  32.  
  33. In article <MUTS.93Jan12100059@PMCS.estec.esa.nl> muts@estec.esa.nl (Peter Mutsaers) writes:
  34. >The implications can be complex, but that is more due to OO than to
  35. >C++ in particular. But it pays for most applications.
  36.  
  37. I am always amused by these arguments that the complexity of C++ is due to some villain like OO or C compatibility, since Objective-C provides such a ready counterexample.
  38. --
  39. --------------------------------------------------------------------
  40. Paul Burchard    <burchard@geom.umn.edu>
  41. ``I'm still learning how to count backwards from infinity...''
  42. --------------------------------------------------------------------
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.