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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.snarked.org!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada202X: Easy to use "UML private"-like components Date: Sun, 23 Jun 2013 16:06:40 +0200 Organization: cbb software GmbH Message-ID: <1im71djlxwm94$.fbjv1si7kmvj$.dlg@40tude.net> References: <69246de0-4b33-4d47-b5be-a45e8c911fb0@googlegroups.com> <9qrbs8l828t3pvgves504a8fm7o1c7tcpj@4ax.com> <91qcs81k6am9l3u3n19lj0b072lc48td69@4ax.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: xkOZ88C3T5fLavXpgyt3vA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2058 Xref: number.nntp.dca.giganews.com comp.lang.ada:182041 Date: 2013-06-23T16:06:40+02:00 List-Id: On Sun, 23 Jun 2013 09:12:53 -0400, Robert A Duff wrote: > It is also the reason for the private part kludge: the compiler sees > the size of the full type for a private type (assuming it is known > at compile time). But this reasoning makes no sense to me, because > that's not how Ada compilers work. Any reasonable implementation > of generics and inlining needs to look at bodies. So full types > should be in bodies, and compilers should look there (at least > in optimizing mode) to find out their size. ... or there should be no generics. The kludge here rather is generics and inlining, both basically are macro expansions. To have public and private parts of the specifications makes much sense to me, as well as to have bodies which are not allowed for looking into (e.g. for shared libraries, remote objects etc). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de