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-05-03 09:22:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.rdc-nyc.rr.com!cyclone.columbus.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3CD2B952.44E58DF6@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) 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> <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> <3CD2AD5F.93BB740A@despammed.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 03 May 2002 16:21:14 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1020442874 66.75.151.160 (Fri, 03 May 2002 09:21:14 PDT) NNTP-Posting-Date: Fri, 03 May 2002 09:21:14 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:23506 Date: 2002-05-03T16:21:14+00:00 List-Id: Wes Groleau wrote: > You can link and run if ANYTHING that has that > interface is compiled. It doesn't have to be > something that "makes the test pass." Correct. But you've still started implementing the code, which is one step more than you need to go. > It can > even be something that you KNOW will fail--in > which case, why waste time running the test? Because you *don't* know it will fail. And perhaps adding that declaration made some *other* test fail. So now you know it was the very declaration making the other test fail (perhaps by overloading something that used to work) rather than the body of the code. > Anyone who feeds you slogans instead of information > is selling something. The above slogan is selling XP. Well, anyone who bases their opinion of an entire programming methodology on "the first thing that caught my eye" is unlikely to make any sort of radical shift in their methodologies, I think. Of course they're selling XP. That's what the paper you printed out is. It's an introduction to XP, i.e., "why do I want to learn more?" Chad sez: > For this you could be break the one type into three > types thus keeping Name as a generic placeholder for 'don't care' while > deriving Current_Name and Maiden_Name from Name. Assuming that "Name" is a tagged type to start with. If Name is an array of characters, I would think changing x(15..20) := "123456"; in the code to something that works with tagged types is going to be difficult to do without touching the code outside the package that declares Name. Or is there something I'm misunderstanding in Ada? > You failed to show how strong typing must slow you down in XP. You can > always elect not to define a type or you could define an object type that > you derive all of your types from. And if you elect not to define a type or define one type that every object in your program is derived from, then you've basically given up strong typing. I also believe it's impossible in Ada, because integers, floats, tasks, generic packages, etc are not tagged types. That Ada makes it possible in many ways to get around the strong typing is a testiment to Ada's power. Since weak typing is basically a subset of strong typing, yes, you can do this. But I doubt any 100,000-line program where every user-defined type is derived from the same object is going to be considered "good Ada style". -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. The 90/10 rule of toothpaste: the last 10% of the tube lasts as long as the first 90%.