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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,d89b08801f2aacae X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-03 01:51:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!news-feed.ifi.uio.no!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Is strong typing worth the cost? Date: Fri, 3 May 2002 08:51:11 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0156.chembio.ntnu.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: tyfon.itea.ntnu.no 1020415871 7885 129.241.83.82 (3 May 2002 08:51:11 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Fri, 3 May 2002 08:51:11 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:23478 Date: 2002-05-03T08:51:11+00:00 List-Id: On Fri, 03 May 2002 02:45:56 GMT, dmjones wrote: > All, > >> I have been trying to locate evidence that the cost of the use >> of strong typing is repaid by a greater benefit. > > I have been following up on the references posted here (thanks all). > > Figure 4 of "Impact of Ada and object-oriented design in the > flight dynamics division of Goddard Space Flight Center", > SEL-95-001 shows a graph of "total types per statement" vs > time (a five year period). The increase is claimed to be > due to an increase in use of strong typing. As I understand the text and Figure it shows how Ada developers were using more strong typing and generic and less tasking and shorter package sizes over the years from 1985 to 1993. So they were starting to utilise the features of the language. > How is "total types per statement" measured? > Is it an average of the number of types appearing in the > same statement? It says earlier that the statement count is "the number of logical statements and declarations". It further says that since 1985 the number of lines per statement for FORTRAN increased from 2.5 to 5 due to commenting, where for Ada it went from 6 to 3 as more of the Ada coding style was used. So it may look like strong typing is doing much of the commenting for you, but this is just a guess as I haven't seen the report referred to either. But at least I think it is a fair interpretation. But I think that the gains of strong typing are reduction in debugging time, more errors are found during compilation more information can be retrieved, ranges etc... leads to a more self-commenting source code. makes maintainability easier though I have no scientific proof. Neither do I see any proof saying that weak typing is better in any way. Are there really a lot of projects out there where maintainability isn't an issue? I can understand that software companies may not care about this, because if they have to rewrite the entire program in order to give the customer a new version with additional features/removal of errors, they would use more time and get more paid. But if the customers don't take this into account, then I don't understand. Given the history of Y2K, it shows clearly IMHO that maintaining the system you have is done to a great extent even if the customer thought he would switch to a new superduper system in the near future. I hope that the times were customers review software engineers as sort of witch-doctors of the village are over. :-) There are two much magic mumbo-jumbo in the air and I for one thinks that bug is a euphemism for error. ;-) OK enough on this, I'll go back to do some more strong typed coding and code reading. :-) Preben -- �There are three things you can do to a woman. You can love her, suffer for her, or turn her into literature.� - Justine, by Lawrence Durrell