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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d89b08801f2aacae X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-30 21:51:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!diablo.theplanet.net!diablo.theplanet.net!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Is strong typing worth the cost? Date: Tue, 30 Apr 2002 14:04:45 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <4519e058.0204290722.2189008@posting.google.com> <3CCE8523.6F2E721C@earthlink.net> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1020189887 15345 136.170.200.133 (30 Apr 2002 18:04:47 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 30 Apr 2002 18:04:47 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:23314 Date: 2002-04-30T18:04:47+00:00 List-Id: Interesting questions. If I write an Ada program using just the types defined in Standard, I've still got stronger typing than writing a C program with the types int and char and double, etc... It doesn't cost any more to use Integer and Character and Long_Float, etc... in terms of any relavent development time, yet you automatically get *some* level of type safety. If it causes a single error to be found at compile time that would have snuck through an equivalent C program that needed to be found with a debugger, one could argue that the fix is inherently less costly since it is found earlier in the process. To argue that this *adds* any cost you'd have to convince yourself that including appropriate conversions and fixing compiler error messages takes some significant amount of time in comparison to having the compiler let everything slide on through. That, while undemonstrated, seems to be highly unlikely. Its not an easy thing to demonstrate with experiments, in any case. There are just too many variables. It might be easier to demonstrate something at a more encompassing level, like "Language X is more productive than Language Y" since there you can easily swap out the variable. But you're still stuck with trying to make all other things be equal. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Chad R. Meiners" wrote in message news:aamiqj$30ce$1@msunews.cl.msu.edu... > > If you want to write the SAME programs (one with and one without strong > typing), you will have to analyze the constraints that you wish to place on > variables in both programs. The cost of using a strong type system is the > creation of types that satisfy your constraints; the cost of not using a > strong type system is writing the code so that it audits itself with > constraint checks every time it modifies the variables. Note that if you do > not wish to place constraints on any variables the strong typing system does > not cost more than the weak typing system since you do not have to create > any types. One can easily construct examples where the strong typing > systems costs less. Can you construct an example where it costs more? > > If you want to write DIFFERENT programs (one with strong typing the others > without), how can you compare the costs of strong typing against the cost of > weak typing? > > -CRM > >