home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!rational.com!thor!rmartin
- From: rmartin@thor.Rational.COM (Bob Martin)
- Subject: Re: Need help implementic data structures of generic objects
- Message-ID: <rmartin.724430168@thor>
- Sender: news@rational.com
- Organization: Rational
- 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>
- Date: Tue, 15 Dec 1992 14:36:08 GMT
- Lines: 28
-
- kocks@leland.Stanford.EDU (Peter Kocks) writes:
-
- >My $0.02. Use Obj-C. I have just spent a fair amount of time
- >comparing strong vs weak type casting systems [...]
-
- For any significant industrial application, I think strong typing is
- utterly essential. It is just too easy to create horrible run time
- errors without type safety.
-
- Does type safety preclude OO? No. It constrains it, certainly. But
- the constraint is IMHO not serious. We can still have polymophic
- types, and containers of heterogenous objects. We just limit the
- amount of heterogeneity by building type walls. This means that you
- can't put Car objects in a list that is meant to hold Shapes. But you
- can put circles, squares and rectangles in this list. And, when
- accessed as Shapes, the circles, squares and rectangles will behave
- polymorphically.
-
- Although mixing type safety with OO causes a slight rearangement of
- thinking in people who are used to OO without type safety. Very
- little capability is actually lost, and a great deal of safety is
- added.
-
- --
- Robert Martin Training courses offered in:
- R. C. M. Consulting Object Oriented Analysis
- 2080 Cranbrook Rd. Object Oriented Design
- Green Oaks, Il 60048 (708) 918-1004 C++
-