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.2 required=5.0 tests=BAYES_00,PLING_QUERY, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b6d862eabdeb1fc4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada noob here! Is Ada widely used? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <0e88de66-128c-48fd-9b9f-fdb4357f318a@z17g2000vbd.googlegroups.com> Date: Sun, 6 Jun 2010 11:22:07 +0200 Message-ID: NNTP-Posting-Date: 06 Jun 2010 11:22:07 CEST NNTP-Posting-Host: d235b6e0.newsspool3.arcor-online.net X-Trace: DXC=i69UF>XZ3 On Sun, 06 Jun 2010 10:25:11 +0200, Yannick Duchêne (Hibou57) wrote: > Le Sun, 06 Jun 2010 09:46:28 +0200, Dmitry A. Kazakov > a écrit: >> = exponentially >> >> http://en.wikipedia.org/wiki/Geometric_progression > OK, a quasi-synonym And, maybe, you have a chance of having it not geometric, but combinatorial... (:-)) http://en.wikipedia.org/wiki/Combinatorial_explosion >>> I remember in the past (past year I think), we talked around generics >>> hierarchy and generic packages as formal parameters. You had warned >>> about >>> possible complexity explosion in this area: is this about the same ? >> >> Yep. Once generic always generic. Two generics make four instantiations. >> And the mill starts milling... > This path is not the only one way. There can be instantiations to be used > as basic components. Generics does not provide just a way to declare > things, this also gives a way to implement, and implementation is an > hidden thing (or else private at least). Generic origin of a type can be > hidden (as an example) ; while obviously, some relationships are then lost. > > This can lead into an combinatorial explosion, right ; except “can” is not > “always” (while I agree to say it can comes faster than supposed, and > recurrence/recursivity should be in mind here while designing). Normally you wanted to postpone instantiation to as late as possible. But any delayed instantiation means a generic formal parameter in another generics and so it leads to the explosion at the point where you ultimately instantiate the mess. This is not a problem for small projects. That is why most Ada people don't see generics as a problem. Add here that generics are non-testable. You can test instances, you cannot generics. Then Ada has been drifting towards C++ in the sense what promises gives you a successful compilation of the generic body, little, very little, nothing... But if you force yourself to instantiate earlier, you get a very fragile design. Generics are against good design. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de