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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC 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-05-03 08:10:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3CD2A86C.85B4CF8@despammed.com> From: Wes Groleau Reply-To: wesgroleau@despammed.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is strong typing worth the cost? References: <4519e058.0204290722.2189008@posting.google.com> <3CCE8523.6F2E721C@earthlink.net> <3CCEB246.9090009@worldnet.att.net> <3CCFD76A.A60BB9A8@flash.net> <3CD0A3B8.7B7C8622@san.rr.com> <3CD15FAE.6DEE0AD@despammed.com> <3CD16B60.93078396@san.rr.com> <3CD1B496.DBE8ADC4@san.rr.com> <3CD1BACC.8938FEAB@despammed.com> <3CD1D17B.F60DCB89@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 03 May 2002 10:10:36 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1020438639 151.168.144.162 (Fri, 03 May 2002 10:10:39 CDT) NNTP-Posting-Date: Fri, 03 May 2002 10:10:39 CDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:23500 Date: 2002-05-03T10:10:36-05:00 List-Id: > type age is integer range 0..50; -- that's one > > x : age; -- that's two > > procedure y(yy : age) is -- That's three > z : age -- That's four > begin > z := blah(yy); > zilch(z); > end y; OK, I take back the comment about your Ada knowledge. Still, only one of these declares a type. Your terminology induced misunderstanding. > Now, if I change X to be a date instead of an age, how many places to I > need to change it? I need to change it two places in Y's body and one Sure. But changing something from "Date" to "Age" in the middle of the project is a sure sign you didn't have a clue what you were working on when you started! Changing from an integer to a disk-based database is even more extreme (pun intended). When they are used in a place where it truly doesn't matter, a generic or a tagged type might be appropriate. In either case, scripting a global change is quite easy. Of course, you still get stuck with recompilation. > > > The inability to compile a program that makes reference to functions you > > > > Ada does not require a subprogram to be written to compile > > a call to it. It does require it to be written (or a "stub" > > for it) to execute the call. > > It requires the subprogram to be declared to compile a call to it, and > it requires the subprogram to be implemented to link. (The difference No, to link you only need a stub, if you are not debugging that subroutine. If you are, the obviously it has to be written either way. > between being able to compile and being able to link is kind of academic > when the goal is to do both at least five times an hour, so I wasn't You make it sound like XP is a euphemism for rapid trial and error. Why not make a hundred copies of the program each cycle, make random changes, and keep the few that look promising? Genetic algorithm--sort of. Seriously, when I have to debug Ada I can (usually) EASILY compile and run five or ten times an hour. But I rarely need five or ten tries to make it work. And when it's old code, those irritating declarations help my changes to be based on understanding instead of guessing or random changes. -- Wes Groleau http://freepages.rootsweb.com/~wgroleau