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.1 required=5.0 tests=BAYES_05,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.unit0.net!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!peer01.am1!peering.am1!npeersf04.am4!fx25.fr7.POSTED!not-for-mail Message-ID: From: Mike H Reply-To: Mike Hopkins Newsgroups: comp.lang.ada Subject: Re: Problem with generic package References: <1ffb84f0-5e50-4807-90ff-dfdfac11c501@googlegroups.com> <1807366a-55d8-4d47-953c-d857f69a3306@googlegroups.com> <9f51076f-71cf-4735-a930-6021946491e8@googlegroups.com> <9c505412-8f30-4e1a-9374-a0d8d12f8db0@googlegroups.com> <534e1d23$0$6710$9b4e6d93@newsspool3.arcor-online.net> MIME-Version: 1.0 Content-Type: text/plain;charset=us-ascii User-Agent: Turnpike/6.07-M () NNTP-Posting-Host: 83.104.138.185 X-Complaints-To: abuse@demon.net X-Trace: 1397683353 83.104.138.185 (Wed, 16 Apr 2014 21:22:33 UTC) NNTP-Posting-Date: Wed, 16 Apr 2014 21:22:33 UTC Date: Wed, 16 Apr 2014 22:13:48 +0100 X-Received-Body-CRC: 884298353 X-Received-Bytes: 1711 Xref: news.eternal-september.org comp.lang.ada:19337 Date: 2014-04-16T22:13:48+01:00 List-Id: Laurent writes >If I have a big generic package but I need only one function from it >but for different types. I have to instantiate the package once for every type. >Which means that there will be a lot of memory allocated for >unused things? Or is the compiler smart enough to cut the unused >parts off? > Ada has been around since the 1980s. Always assume that the compiler writers are smaller than you are until contrary evidence suggests otherwise -- Knowledge is knowing a tomato is a fruit Wisdom in knowing not to put it in the fruit salad. Mike ;-)