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,T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,39579ad87542da0e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.122.200 with SMTP id lu8mr4988624pab.4.1368583778302; Tue, 14 May 2013 19:09:38 -0700 (PDT) Path: bp1ni2274pbd.1!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Seeking for papers about tagged types vs access to subprograms Date: Sat, 11 May 2013 09:12:42 +0200 Organization: cbb software GmbH Message-ID: <1181wq8vjk781.2wo8wfbtbr61.dlg@40tude.net> References: <1luaso698dpcc$.rrv8385qwl92.dlg@40tude.net> <1xlzfj8qy1zey$.up1s1v3syagv.dlg@40tude.net> <1nw4bxyvk1gj5.xmiirr0diavq$.dlg@40tude.net> <1q07vm77kfwla$.1cz0xwxspxhay.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 15waz9CoS+eMakbyhTPyFQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Received-Bytes: 4145 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-05-11T09:12:42+02:00 List-Id: On Fri, 10 May 2013 20:00:39 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1q07vm77kfwla$.1cz0xwxspxhay.dlg@40tude.net... >> On Thu, 9 May 2013 16:33:55 -0500, Randy Brukardt wrote: >> >>> As usual, I pretty much totally disagree with your thinking here. The last >>> statement is trivially true, of course, but so what? A program has to be >>> built on top of a handful of "big" abstractions. And for each of those "big" >>> abstractions, there has to be a single type which takes the lead >>> (probably with a family of other types in support). >> >> Takes the lead, how? An abstraction including Employer, Employee, Factory, >> Salary, Time, Duration, Integer, Address, Gender, Age ... Who takes the >> "lead"? > > The container that wraps those things up, of course. And if there is no > container, then they're clearly all separate abstractions that have to be > treated that way. How to separate Employer and Employee? >>> In bigger systems, each of those abstractions corresponds to a subsystem >>> (in Ada, that's best modeled as a family of child packages). Inside each of >>> those subsystems, you'll have another family of types. But the majority of >>> these types should not extend beyond the subsystem. >> >> How these subsystems are going to interact to each other? > > As little as possible. It does not tell how. >>> You seem to claim that all types are equally important, which is obvious >>> nonsense. >> >> Yes, I say that unimportant types need not to be exposed in public >> interfaces. >> >> Everything declared in the *same* scope is equally important, or else you >> have a design issue. > > What utter nonsense. > > Ada.Text_IO defines Count, File_Type, File_Mode, Field, and Number_Base > types. If you think these are all equally important for the primary task of > doing I/O, you have a real problem with perspective. File_Type does all of > the work, while the rest just raise the abstraction level a bit. In which sense? From the implementation point of view GNAT's File_Type is an address or integer, if I correctly remember. It does nothing. From the user's point of view Put_Line, Get_Line do not even mention File_Type. And there are lot of questions to Text_IO design anyway. One problem is worth mentioning. It is a typical God-class design: http://en.wikipedia.org/wiki/God_class This is the destination point of the idea of equivalence of object and abstraction, a very OO idea. What you are talking about is basically classic OOA/D put in different terms. > I don't see any reason to quantify "importance". In order to prove your point? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de