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-Thread: 103376,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-ber1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: ADA Popularity Discussion Request Date: Sat, 11 Sep 2004 12:06:04 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <49dc98cf.0408110556.18ae7df@posting.google.com> <413e2fbd$0$30586$626a14ce@news.free.fr> <4140b5cc$0$17701$626a14ce@news.free.fr> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1094904364 10145 134.91.1.34 (11 Sep 2004 12:06:04 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Sat, 11 Sep 2004 12:06:04 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:3588 Date: 2004-09-11T12:06:04+00:00 List-Id: Kevin Cline wrote: : Explicit static typing ala Ada and C++ definitely has a cost, Yes. (And you get something in return, too?) : because it makes the code longer, Sometimes I prefer a few explicit words to brevity when brevity would hide things away. : and also makes it more brittle. Hm. Brittle? Your example could be a design issue. In Ada you could have written generic type FPT is digits <>; function compute(x, y: FPT) return FPT; or generic type FPT is digits <>; package Computations is ... I'm confident that changing the floating point type might not have required adjusting a lot of calls? Related to making changes to parameter profiles, subtype declaractions and type declarations offer at least one choice: - use (possibly constraining) subtypes where you expect slight changes to the range of values passed. (Use T'base type parameters if a function needs to be more general.) - use types where the domain objects are different, or where things should be handled separately in code. -- Georg