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

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!decwrl!csus.edu!netcom.com!objsys
  3. From: Bob Hathaway <objsys@netcom.com>
  4. Subject: Re: O.M() versus M(O) notation
  5. Message-ID: <c+0m6cl.objsys@netcom.com>
  6. Date: Tue, 18 Aug 92 03:02:46 GMT
  7. Organization: Object Systems
  8. References: <1992Aug5.162329.22871@ucunix.san.uc.edu> <1992Aug15.124149.28538@m.cs.uiuc.edu>
  9. Lines: 67
  10.  
  11. In article <1992Aug15.124149.28538@m.cs.uiuc.edu>, johnson@m.cs.uiuc.edu (Ralph Johnson) writes:
  12. >Piercarlo is right that there are many different definitions of the
  13. >word 'type', and that sometimes the same person will use several of
  14. >the definitions at once.  He also does a good job of enumerating the
  15. >different kinds of definitions.  I'd like to focus on one particular
  16. >distinction, between a mathematical object and a description of a
  17. >mathematical object.
  18.  
  19. Not really.  Types and type systems are clearly defined in almost all
  20. compiler texts (ASU), several modern languages (Emerald, Trellis/Owl),
  21. several texts (Booch, Won Kim), and etc.  ***I could make up terms to my
  22. liking too*** but it is better to use standard computer science terminology
  23. if for no other reason than to be able to communicate well with colleagues.
  24. Read up on the subject if you're confused!  The compiler terminology is
  25. so clear there should be no confusion.
  26.  
  27. >...
  28. >Thus, 'type' is usually taken to mean just the interface.  If a language
  29. >also supported assertions, as Eiffel does, then type would be interface
  30. >+ assertions.  (Note, however, that Eiffel defines type as interface +
  31. >assertions + implementation.)
  32.  
  33. This is based on the made-up definition of interface.  Typically any kind of
  34. interface includes everything defined within it.  Assertions/constraints
  35. are obvously part of an interface if thats where they appear.
  36.  
  37. >In the OO community, claiming that classes and types should be
  38. >different usually is part of an argument that interfaces and implementation
  39. >should be seperated so that they can be reused seperately, and that
  40. >inheritance should be different from "can this object be used in place
  41. >of that object".  Bertrand Meyer is probably the chief opponent to this
  42. >view.  He says that one of the chief advantages of OOP is that it
  43. >*combines* interfaces with code, and that people who try to seperate
  44. >them are making a mistake.  Thus, it would be a mistake to think that
  45. >there is a concensus on this issue.
  46.  
  47. These issues are not mutually exclusive; they can be used as appropriate.
  48. IMHO to claim types (verses class inheritance) should always be used
  49. in trivial static deterministic domains or that class-based typing should
  50. always be used in more flexible ones is unfounded.
  51.  
  52. >On 13 Aug 92 01:58:32 GMT, objsys@netcom.com (Bob Hathaway) said:
  53.  
  54. >objsys> No, type and type systems are independent of implementation.  I
  55. >objsys> think this distinction is very important from both a compiler
  56. >objsys> and applications point of view.
  57.  
  58. >Bob is using 'type' as 'interface specification'.  I think he is fairly
  59. >consistent with this use, though he also uses it to refer to the set of
  60. >objects that meet the interface.
  61.  
  62. Not really, I believe I always refer to type separately from the "set of
  63. objects that meet the interface".  It can get confusing at times since
  64. most people are used to the combination of type and class.
  65.  
  66. >'Type' can mean
  67. >  a mathematical object -- all 'objects' that meet a specification
  68. >  an interface specification
  69. >  an expression that denotes an interface specification
  70. >  the data structure inside a compiler that represents an interface spec.
  71.  
  72. Type refers to an interface specification (or perhaps an expression returning
  73. one) in the terms above ***within the domain of programming languages and
  74. compilers***.
  75.  
  76. bob
  77. objsys@netcom.com
  78.