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 X-Google-Thread: 103376,5c89acd494ea9116 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder3.cambrium.nl!feeder6.cambrium.nl!feed.tweaknews.nl!xlned.com!feeder1.xlned.com!newsfeed.freenet.de!bolzen.all.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Self pointer in limited record Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1183577468.034566.57830@n60g2000hse.googlegroups.com> <1188578849.187422.280620@50g2000hsm.googlegroups.com> <9fy1xoukz1e3$.h574sqmiauri$.dlg@40tude.net> <46d968ee$0$30368$9b4e6d93@newsspool4.arcor-online.net> <137iu0lr82dtb$.wqy3zjz2vr9q.dlg@40tude.net> <46d972e8$0$30384$9b4e6d93@newsspool4.arcor-online.net> <1alyfwaig93sk$.99oy269uon$.dlg@40tude.net> <46d9c138$0$4531$9b4e6d93@newsspool3.arcor-online.net> <1rt8kdcrj6tf.1qgvycc6vh357$.dlg@40tude.net> <46db2bf4$0$7699$9b4e6d93@newsspool2.arcor-online.net> <1188816674.2630.25.camel@kartoffel.vocalweb.de> Date: Mon, 3 Sep 2007 16:17:54 +0200 Message-ID: <9cdmw7k85sey.85sb2t1bjefy$.dlg@40tude.net> NNTP-Posting-Date: 03 Sep 2007 16:17:30 CEST NNTP-Posting-Host: 79eade43.newsspool4.arcor-online.net X-Trace: DXC=M\7P:E1WDX]U6b:FjPaGjQ4IUK8b[HYg\I30YA_J[KT^ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:1696 Date: 2007-09-03T16:17:30+02:00 List-Id: On Mon, 03 Sep 2007 12:51:14 +0200, Georg Bauhaus wrote: > On Mon, 2007-09-03 at 09:53 +0200, Dmitry A. Kazakov wrote: >> On Sun, 02 Sep 2007 23:37:33 +0200, Georg Bauhaus wrote: >> >>> Suppose every package is reusable. >> >> That's the goal. > > Why? In order to get a better understanding of the problem and solution. > The "abstract state machines" kind of package (as opposed > to those packages framing an "abstract data type") do work well > in Ada program without a type parameter; it doesn't carry > any additional information of spectacular use. It is difficult to see how an abstract state machine is not a type. The very word abstract assumes generalization, reuse and instances. It is types and generics, the tools to express the idea of instances. > Why the heck do I have to defend nesting of packages in the first > place? Is it because some popular languages and UML do not > usually nest object abstractions inside procedural artifacts? > Is it because you do not usually have nesting in C? Those are very low-level languages. UML is just typeless. > Is it because GCC (hence GNAT to some extent) was not built > knowing there would be locally defined things in languages > such as Ada? For dynamic scoping there exit blocks. We cannot replace blocks by packages. So let blocks rule. The only possible reason for nested packages is the language regularity: if a package can be nested in another package, then it should be allowed in any declarative scope. Probably even between "for" and "loop"! (:-)) But if you removed nested packages altogether you would probably notice no miss. Because it is only static nesting which is really needed, and that is covered by the child packages. It could be otherwise if packages were first-class objects, with abstract packages and the interfaces of. But that is a story for another day. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de