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,8591be732d0fce98 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 25 Jul 2008 18:24:26 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada OOP alternatives? References: <462e0cf4-1d53-4918-b30b-dd3d8df90f1b@p25g2000hsf.googlegroups.com> <487d9636$0$6543$9b4e6d93@newsspool3.arcor-online.net> <6e5uq2F5g7n6U2@mid.individual.net> <1y046u74vmwh3.19jm2fcdx5xpt.dlg@40tude.net> <5ob7w7usrc74$.kms2e1vqs4k0.dlg@40tude.net> <48883529$0$18826$9b4e6d93@newsspool2.arcor-online.net> <48883f41$0$18829$9b4e6d93@newsspool2.arcor-online.net> <6i1s0y8eeka.121ek9qcgunha$.dlg@40tude.net> <48885757$0$18818$9b4e6d93@newsspool2.arcor-online.net> <48899335$0$18824$9b4e6d93@newsspool2.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4889fe3a$0$18828$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 25 Jul 2008 18:24:26 CEST NNTP-Posting-Host: 56354974.newsspool2.arcor-online.net X-Trace: DXC=XKa`TFPWI;XmG86`U=_nC_A9EHlD;3YcR4Fo<]lROoRQ4nDHegD_]RUCeYP[_UM6PS;9OJDO8_SKVNSZ1n^B98iZ2ADb@`XLES] X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:1331 Date: 2008-07-25T18:24:26+02:00 List-Id: Dmitry A. Kazakov schrieb: > On Fri, 25 Jul 2008 10:47:49 +0200, Georg Bauhaus wrote: > > [...] >> Suppose you try to use an IDE in place of "separate", >> to hide away the details of Special_Case. Then the dependences >> on the with'ed package Ada.Text_IO and on All_Kinds_of_Things_Neccessary >> will have to be listed for the entire package. > > Yes, but it would not change dependencies. Yes, separate units can change the dependences of a package body. E.g., in a good many cases, a package body can be compiled without the separate unit. (It can be compiled without a child package, too). When the separate unit depends on a yet-to-be written/delivered package, the parent body is not affected. You cannot achieve this kind of compilation advantage when you put the separate subprogram into the parent body instead. (Not different from a child.) > Better, there should be a "without" clause/pragma (:-)) :-) > So, yes, an ADT, even if it is a singleton today. For what? I think that language theorists have ways to associate a synthetic OO type with a singleton package without loss. > Only objects should have states. Yes, only objects can have states. I am assuming you mean that every variable object of a scope other than the scope of an innermost subprogram is evilly global? > Global variables is > a no-no. There cannot be stateful procedures otherwise than impure, with > global variables. When the "global" variable cannot be manipulated by anything besides a visible procedure, this statement is false. private package Parent.Singleton is procedure Bump(Item: Some_Type); end; I see you disagree with state variables hidden in singleton package bodies. I claim that passing them around instead has potential for creating spaghetti. Plus it requires a visible, private type and a way to enforce only one object. The weekend is near, I'll go for a walk if you don't mind. -- Georg Bauhaus Y A Time Drain http://www.9toX.de