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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,158ce2376534c35d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!k9g2000yqf.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Derived private interface Date: Thu, 28 Jul 2011 03:06:23 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <27656578-65aa-48b9-9f89-4ebd4e0cb02a@glegroupsg2000goo.googlegroups.com> <0fe3b0f8-c064-444d-899d-640e891b58c3@w4g2000yqm.googlegroups.com> <128d8eb5-1cc6-47e3-a09b-b53a5ef289ce@m10g2000yqd.googlegroups.com> <4e141501$0$6629$9b4e6d93@newsspool2.arcor-online.net> <4b2728fc-6127-45d8-a314-9fc491701c26@g12g2000yqd.googlegroups.com> <82vcve4bqx.fsf@stephe-leake.org> <4e15b223$0$6541$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: 83.3.40.82 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1311847701 1130 127.0.0.1 (28 Jul 2011 10:08:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 28 Jul 2011 10:08:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k9g2000yqf.googlegroups.com; posting-host=83.3.40.82; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:21364 Date: 2011-07-28T03:06:23-07:00 List-Id: On Jul 27, 1:43=A0am, Jeffrey Carter wrote: > > Others have pointed out that using case statements as you suggested is > > essentially worthless unless you know every entity that the program is = going > > to process before the fact. And real world programs are not like that > Yes, it's called "design", and it's part of what distinguishes S/W engine= ers > from coders. This statement is unfair and uses a very superficial argumentation. No matter how much extensive is the "design" and how good are the S/W engineers doing it, a complete view on the system is not always feasible. Software is built from components that are prepared in separation, possibly by different vendors. They have no way to know the complete set of types that will be used in the final system, as the final system might not be even invented yet when the components are produced. Using the open/closed principle with the help of dispatching operations is the cleanest and the least intrusive way to integrate such components and generics are not always applicable - a canonical example is the web server component that delivers the client request to the layer that can handle it. I've yet to see an approach that is cleaner and less error-prone than the dispatching call via an interface type. > As you note, it's an iterative process. The extra work and extra > code is worth it It is iterative on which side? The extra work by whom? > for the significant improvement in ease of reading and > understanding that results. Did you try that with web servers? -- Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com