home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 17987 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.8 KB  |  40 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!rational.com!thor!rmartin
  3. From: rmartin@thor.Rational.COM (Bob Martin)
  4. Subject: Re: Need help implementic data structures of generic objects
  5. Message-ID: <rmartin.724430168@thor>
  6. Sender: news@rational.com
  7. Organization: Rational
  8. References: <1992Dec8.165230.2587@ucc.su.OZ.AU> <42186@sdcc12.ucsd.edu> <1992Dec11.233253.27540@informix.com> <1992Dec13.141400.5307@mole-end.matawan.nj.us> <1992Dec14.212143.15591@leland.Stanford.EDU>
  9. Date: Tue, 15 Dec 1992 14:36:08 GMT
  10. Lines: 28
  11.  
  12. kocks@leland.Stanford.EDU (Peter Kocks) writes:
  13.  
  14. >My $0.02.  Use Obj-C.  I have just spent a fair amount of time
  15. >comparing strong vs weak type casting systems [...]
  16.  
  17. For any significant industrial application, I think strong typing is
  18. utterly essential.  It is just too easy to create horrible run time
  19. errors without type safety.  
  20.  
  21. Does type safety preclude OO?  No.  It constrains it, certainly.  But
  22. the constraint is IMHO not serious.  We can still have polymophic
  23. types, and containers of heterogenous objects.  We just limit the
  24. amount of heterogeneity by building type walls.  This means that you
  25. can't put Car objects in a list that is meant to hold Shapes.  But you
  26. can put circles, squares and rectangles in this list.  And, when
  27. accessed as Shapes, the circles, squares and rectangles will behave
  28. polymorphically. 
  29.  
  30. Although mixing type safety with OO causes a slight rearangement of
  31. thinking in people who are used to OO without type safety.  Very
  32. little capability is actually lost, and a great deal of safety is
  33. added.  
  34.  
  35. --
  36. Robert Martin                        Training courses offered in:
  37. R. C. M. Consulting                       Object Oriented Analysis
  38. 2080 Cranbrook Rd.                        Object Oriented Design
  39. Green Oaks, Il 60048 (708) 918-1004       C++
  40.