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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c5ca2cbae60e9fee X-Google-Attributes: gid103376,public From: Ehud Lamm Subject: Re: OO puzzle Date: 1999/12/25 Message-ID: <8420f8$hm4$1@nnrp1.deja.com>#1/1 X-Deja-AN: 564737435 References: <386102F6.56CEFA22@averstar.com> <83sq9g$5ml$1@nnrp1.deja.com> <83t14p$9ps$1@nnrp1.deja.com> <83t2vt$arh$1@nnrp1.deja.com> <83uk4d$mec$1@nntp6.atl.mindspring.net> X-Http-Proxy: 1.0 o-proxy.cc.huji.ac.il:8080 (Squid/2.2.STABLE4), 1.0 x38.deja.com:80 (Squid/1.1.22) for client 132.64.12.10, 132.64.1.34 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat Dec 25 08:52:43 1999 GMT X-MyDeja-Info: XMYDJUIDehudlamm Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Date: 1999-12-25T00:00:00+00:00 List-Id: In article <83uk4d$mec$1@nntp6.atl.mindspring.net>, swhalen@netcom.com wrote: > > I'm missing something here (which is not that unusual ). > > I know Ada _much_ better than I know Eiffel, but my impression is > that Ada already _is_ designed > > "in such a way as to ensure as much can be done during compile > time, as possible without hurting expressablity to much." > > In many ways, that seems to me a good definition of one of the major > design goals (and successes) of Ada. > Quite. But in this case we are talking about something very specific, so the question is could this specific kind of checks be done before runtime, and at what costs. Compare this with generics. Ada(83) generics are designed so that checking can be done seperately on the generic unit, and the instantiation. This allow seperate compilation, and early detection of errors. But it relies on the fact the generic paramaters compromise very specific classes of types etc. OO which by nature uses late binding etc. can make this issue harder. One more reason why I am a fan of generics. But still not an answer to the specific cases I outlined in the original post. Can we ensure the truck_driver/driver distinction using compile time checks? -- Ehud Lamm mslamm@mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm Check it out and subscribe to the E-List Sent via Deja.com http://www.deja.com/ Before you buy.