From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: Mark Windholtz Subject: Re: OO, C++, and something much better! Date: 1997/01/24 Message-ID: <32E8C18F.354B@sdrc.com>#1/1 X-Deja-AN: 211906650 distribution: world references: <32DF458F.4D5C@concentric.net> <32DF94DC.6FF8@watson.ibm.com> <32DFD972.37E4@concentric.net> <5bphq4$5js@mulga.cs.mu.OZ.AU> <32E05FAF.47BA@concentric.net> <5buodl$bci@boursy.news.erols.com> <32E2FEC7.2F7B@concentric.net> <5bvncj$gqg$1@A-abe.resnet.ucsb.edu> <32E47B4B.56D9@concentric.net> <32E4E6E1.437E@dstsystems.com> content-type: text/plain; charset=us-ascii organization: Structural Dynamics Research Corporation mime-version: 1.0 newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object x-mailer: Mozilla 3.0 (X11; I; HP-UX A.09.07 9000/777) Date: 1997-01-24T00:00:00+00:00 List-Id: Marc Robertson wrote: > > Alan Lovejoy wrote: > > > > Graham Hughes wrote: > > > > > > Why should they manually check that the object is capable of the > > > operations demanded when the compiler can? > > > > This is a non argument. Since someone must check, there is no difference in > > principle whether that someone is the compiler or the run-time system. It's > > an implemenation difference, not a difference in kind. > > There is a difference in practice. If the compiler detects an error, > the only one that has to worry about it is the developer. If an error > is present that the run-time system has to handle, all users are > potentially affected by it. There have been any number of studies( > unfortunately, I don't have access to them here, so I can't quote them ) > that indicate that the cost to correct a problem increases dramatically > the later in the development process you detect it. The sooner problems > can be eliminated, the less it costs to eliminate them! > -- I'm sure most agree that finding and correcting problems early is a good thing. The question is what kind of problems? Dynamic languages let you test the logic more and static languages (perhaps) let you test the interfaces more. I say "perhaps" because as soon as casting is added to a program written in a static language, you lose the testing of the interface. And it is very hard to write interesting OO in a static language without occationally casting. I maintain that to use a static language with casting amounts to paying the time-to-market cost of a static language while writing extra code to support features that come for free in a dynamic language. It seems to be the worst of both worlds. The mistake of casting NULL to an object and attempting to call a function on it in C++ is the same mistake as sending a message to the Nil object in Smalltalk. But at runtime only the static language is likely to cause a core dump or GPF. In other words the result of the error is more costly. And the compiler can't help in either case. ------------------------------------------- Cincinnati/Dayton Smalltalk Users Group http://www.infinet.com/~mwind/st_users.htm ------------------------------------------- Mark.Windholtz@sdrc.com (513) 576-5626 home:Windholtz@acm.ORG