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,158ce2376534c35d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!aioe.org!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Derived private interface Date: Tue, 26 Jul 2011 16:43:09 -0700 Organization: TornevallNET - http://news.tornevall.net 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: e8af7aab0a7a4fd8e8d4bd6da6b291f7 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: eb67e7918112b90fadee6909d0c75f53 X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=eb67e7918112b90fadee6909d0c75f53 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news2.google.com comp.lang.ada:21347 Date: 2011-07-26T16:43:09-07:00 List-Id: On 07/26/2011 02:04 PM, Randy Brukardt wrote: > > You're right in language terms, but as Dmitry points out, this occurs only > because we're discussing tagged types (which include 3 of the 4 OOP legs in a > single package). I was thinking more generally (and yes, I just complained > about Dmitry doing that); what I was thinking of by "extension" was actually > adding components to a type, not just deriving a a type with the same set of > components. > > As I was describing, most of the use of dispatching in Claw does not use any > extension (that is, adding new components), it just changes the behavior of > the dispatching routines appropriately. So there is only a change in > behavior, not a change in representation. ARM 3.9.1 defines a type extension as record_extension_part ::= with record_definition and record_definition includes "null record", so these are all extensions and examples of programming by extension. I wouldn't have thought that I'd have to define what I meant when using an Ada term with you. > 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 (I have > plenty of experience changing hundreds of case statements each time we make a > change in node types or intermediate code definitions in Janus/Ada). Yes, it's called "design", and it's part of what distinguishes S/W engineers from coders. As you note, it's an iterative process. The extra work and extra code is worth it for the significant improvement in ease of reading and understanding that results. -- Jeff Carter "I was in love with a beautiful blonde once, dear. She drove me to drink. That's the one thing I'm indebted to her for." Never Give a Sucker an Even Break 109