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,8591be732d0fce98 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!195.14.215.231.MISMATCH!newsfeed-fusi2.netcologne.de!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada OOP alternatives? 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: <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> Date: Thu, 24 Jul 2008 14:48:02 +0200 Message-ID: NNTP-Posting-Date: 24 Jul 2008 14:48:02 CEST NNTP-Posting-Host: 01c4bd85.newsspool1.arcor-online.net X-Trace: DXC=V[]W1DIkOhTYQ5E:lkgRoE]ZnHOc^mT X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7041 Date: 2008-07-24T14:48:02+02:00 List-Id: On Thu, 24 Jul 2008 12:20:07 +0200, Georg Bauhaus wrote: > Dmitry A. Kazakov wrote: >>>> then in 80s, but it is no any problem now. IDEs do it better. >>> Ada IDEs cannot affect semantics? >> >> I am not sure what you mean... GPS does affect the semantics when you >> change some project options. > > I meant the semantics of child packages and separate units > as given in the program text. I lost your point. Can you elaborate it a bit more? Just to remember, mine was that separate bodies were often used to structure the source code in order to make it more maintainable and readable. IDEs and tools are better suited for that. Another use I can recollect was stubs [in top-down structured programming]. Unfortunately it never really worked. Today we are using abstract primitive operations instead. >>> But suppose your implementation includes one subprogram, >>> procedure A(... : T; ...); >>> that provides for one aspect of the solution made with T. >>> If that one aspect depends on packages P3 and P4, but A is the >>> only supbrogram in your package that depends on P3 or P4, >>> why create another child just for this one aspect? >> >> Which is exactly the problem. "Just one aspect" is an improper way of >> problem decomposition. > > Why, e.g., build an entire type when a single procedure > is sufficient, and will be sufficient in the future? How can you know that? > It is possible to think of a procedure (or function etc.) as an > abstract state machine. Hmm, it is almost impossible. Procedures describe transitions between states encapsulated by the parameters and the results of (only the latter in pure functional languages). > Many languages have a function type > built in, functions are objects. But not in the sense of a stateful object of OO. They are language objects (a completely unrelated thing, except that in an OOPL a stateful object is a language object.). >> 3. The "aspects" available for "separation" are often low level. Your >> example nicely illustrates this point. It is a pure low-level procedural >> decomposition. > > OK but this shows very little. Without a procedure (as in "procedural > decomposition"), a program does nothing. Should every procedure > be a primitive operation? Yep, very much so. > This question is IMO worth asking > when the task at hand is not "the general theory of problem > decomposition using ADTs" but "how to write this specific program". I was always wondering people saying such things. Yes, you can drive the wrong side of the road so long there is no police officer watching you. > There is a trade-off: Really? > Another ADT child package could become more > general but introduces complexity. Artificial complexity as, > I'm sure, some will say. Well, well, Ada is complex, C is good. Why do you need that artificial complexity. Everything is void * etc... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de