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-7-bit X-Google-Thread: 103376,d89b08801f2aacae X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-30 04:50:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3CCE8523.6F2E721C@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is strong typing worth the cost? References: <4519e058.0204290722.2189008@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 30 Apr 2002 11:50:40 GMT NNTP-Posting-Host: 63.178.185.82 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1020167440 63.178.185.82 (Tue, 30 Apr 2002 04:50:40 PDT) NNTP-Posting-Date: Tue, 30 Apr 2002 04:50:40 PDT Xref: archiver1.google.com comp.lang.ada:23264 Date: 2002-04-30T11:50:40+00:00 List-Id: dmjones wrote: > > Thanks for the reference. But I my interest is purely in > the advantages of strong typing. Language comparison is too > broad an issue. > > The experiment I had in mind was two set of subjects, all > working on the same Ada program. However, one set of subjects > is not allowed to use subranges or subtypes. All objects > holding integer values have integer type. The other > set of subjects would be able to create as many different > integer types as they liked. > > How long would each group of subjects take to complete their > tasks, and what would down stream maintenance costs be (for > programs created by each set of subjects) > ? So far the only aspect of strong typing that's been mentioned here is that of type and constraint checking, i.e., defensive use. Don't forget that strong typing is also an offensive aid, allowing programmers to implicitly embed massive amounts of information within their software that can then be extracted with the aid of attributes. Think about it, what relevent information can you deduce about the characteristics of: Alt : Integer; versus: type Altitude_Type is range 0 .. 50_000; Alt : Altitude_Type; ? E.g., 'First, 'Last, 'Range, etc. The inherent ability to embed and extract information via properly conceived type definition is one of the most overlooked and underused strengths of strong typing. Don't fight strong typing, USE it! Marc A. Criley Consultant Quadrus Corporation www.quadruscorp.com