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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Problem with generic package Date: Wed, 16 Apr 2014 17:31:59 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: 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> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1397687521 31376 69.95.181.76 (16 Apr 2014 22:32:01 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 16 Apr 2014 22:32:01 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 2270 Xref: number.nntp.dca.giganews.com comp.lang.ada:185776 Date: 2014-04-16T17:31:59-05:00 List-Id: "Mike H" wrote in message news:dJJMtxAMKvTTFwdN@ada-augusta.demon.co.uk... > 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 I think you probably meant "smarter" rather than "smaller" in the above. Otherwise, I think you are making an unsupportable statement (although it might have been true in my specific case when Janus/Ada was created, not so much anymore ;-). Randy.