home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / object / 3224 < prev    next >
Encoding:
Text File  |  1992-08-16  |  2.2 KB  |  43 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!munnari.oz.au!metro!graham
  3. From: graham@maths.su.oz.au (Graham Matthews)
  4. Subject: Re: O.M() versus M(O) notation
  5. Message-ID: <graham.714051874@galois>
  6. Sender: graham@maths.su.oz.au
  7. Nntp-Posting-Host: galois.maths.su.oz.au
  8. Organization: School of Mathematics and Statistics, University of Sydney
  9. References: <1992Aug5.162329.22871@ucunix.san.uc.edu> <PCG.92Aug12205741@aberdb.aber.ac.uk>     <__5mtrq.objsys@netcom.com> <PCG.92Aug14170701@aberdb.aber.ac.uk>     <1992Aug15.124149.28538@m.cs.uiuc.edu> <PCG.92Aug16184526@aberdb.aber.ac.uk> <1992Aug16.212818.29943@m.cs.uiuc.edu>
  10. Date: Mon, 17 Aug 1992 11:44:34 GMT
  11. Lines: 30
  12.  
  13. (Ralph Johnson) writes:
  14. >First, I agree completely that it is a good idea to separate interface
  15. >from implementation and from specification.  There are times when you
  16. >want to be able to reuse one of them without reusing the other, and
  17. >combining them in the way that all the popular object-oriented languages
  18. >do makes it harder to reuse just the piece you need.  This results in
  19. >tricks like overriding an operation to make it generate an error
  20. >message, which Piercarlo complained about.  Separating interface from
  21. >implementation seems to be the trend in the design of object-oriented 
  22. >programming languages.  There are several research languages that follow 
  23. >this path, though the only language I know about that is expected to be 
  24. >widely used and that separates interface from implementation is the 
  25. >object-oriented Cobol proposal.  I'd love to be told of languages that
  26. >separate specification from implementation that I don't know about.
  27. >
  28. >Note that languages like Smalltalk have only implementation; they don't
  29. >provide a separate interface or specification.  Only Eiffel provides
  30. >any sort of specification (pre and post conditions and class invariants)
  31. >in the language.
  32.  
  33. Could someone provide a concrete example of where seperating interface
  34. and implementation buys one a whole lot, or where you want to inherit
  35. part of an interface. I am not saying that it can't be done or isn't
  36. useful, I am merely interested in an illustrative example.
  37.  
  38. graham
  39. --
  40. Graham Matthews                 And it's true we are immune
  41. Pure Math, Uni.Sydney, Oz       When fact is fiction and T.V. is reality
  42. graham@maths.su.oz.au
  43.