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,a84eaf8fb2470909 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: Ada generics References: <1166710494.869393.108730@a3g2000cwd.googlegroups.com> <17fe4xfogg7p5.1dcyc5nyc2gsl.dlg@40tude.net> <1166805696.291429.239590@48g2000cwx.googlegroups.com> <1166811980.980627.270680@a3g2000cwd.googlegroups.com> <06tzznwsso.fsf@hod.lan.m-e-leypold.de> From: Markus E Leypold Organization: N/A Date: Fri, 22 Dec 2006 22:01:44 +0100 Message-ID: <5plkkzwsp3.fsf@hod.lan.m-e-leypold.de> User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:w9yy2nyYptQ4nUvvhb/4viMmJhY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.224.204 X-Trace: news.arcor-ip.de 1166821085 88.72.224.204 (22 Dec 2006 21:58:05 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news3.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!news.unit0.net!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:7996 Date: 2006-12-22T22:01:44+01:00 List-Id: Markus E Leypold writes: >> Nonsense. C++'s approach to identifying instantiations serves it >> excellently well in a variety of ways - traits classes, >> metaprogramming, optimized specializations, and best of all, automatic >> instantiation of function templates. > > You only have to do all that if you "instantiate" templates in header > files. If on the other side you have a separation into bodies and > interfaces there is a place where the package gets instantiated > (basically a place where the open parameters describing the data sizes > and stackframe layout are recorded). And that simply is the package > instance -- no need to generate code and no need to fold multiple > instantiation with the same parameters into one. > > In Ada -- as I understand it -- an instantiation is simply identified > by the place where the ... package is instantiated. > > This approach is of cause not possible with header files (inclusion > vs. usage). > Regards -- Markus