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,84f721148b16bb3 X-Google-Thread: fac41,b501d1c53ed57c5b X-Google-Attributes: gid103376,gidfac41,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.velia.net!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: The A-Z of Programming Languages: Ada, interview with S. Tucker Taft Newsgroups: comp.lang.ada,comp.lang.eiffel User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <910cef1d-2ba2-4130-8f1f-2ce192756cfa@d77g2000hsb.googlegroups.com> <4846a33e$0$27453$9b4e6d93@newsspool4.arcor-online.net> <2f24888f-35fc-4b7d-b188-d121d950063d@b1g2000hsg.googlegroups.com> <4847f10d$0$6543$9b4e6d93@newsspool3.arcor-online.net> <48484147$0$7547$9b4e6d93@newsspool1.arcor-online.net> Date: Thu, 5 Jun 2008 22:46:23 +0200 Message-ID: NNTP-Posting-Date: 05 Jun 2008 22:46:22 CEST NNTP-Posting-Host: 46df3512.newsspool3.arcor-online.net X-Trace: DXC=BMYAGgS4l`^YQ5E:l On Thu, 05 Jun 2008 21:40:55 +0200, Georg Bauhaus wrote: > "A massive increase in complexity will result from 9X adding one or more > additional possibilities where Ada now offers two. For example, 9X adds: > [...] access parameters, to IN, OUT, and IN OUT; tagged types, to normal > types; dispatched subprogram calls, to normal subprogram calls; use type > clause, to use package clauses; ... With 9X, the number of interactions > to consider is close to 60,000 since we have 3 or more possibilities in > each case (that is, 3^10)." (OOSC2, �33.7, p.1095) I cannot decode this, so let it be... > The comment "adds: tagged types, to normal types" is particularly > interesting, I think, because it touches on a consequence of > this distinction: sloppy versus exact base type systems: In which sense "sloppy/exact"? > Ada, as mentioned by Ichbiah, has "normal" types for defining > integers, reals, etc., and tagged types for defining polymorphic types. Tagged types aren't polymorphic. Only their classes (closures of) are. > You want integers between 0 and 10_000 only? Define a corresponding > normal type, or do "normal" derivation from another integer type > adding the needed constraint. > (Part of the language since Ada 83 as pointed out by J.-P. Rosen above.) Well, I understand this complain. Actually, there is no semantic difference between: subtype S is T ...; -- "Normal" derivation and type S is new T with ...; -- "Abnormal" derivation and with Ada 2005 type S is interface and T; -- "Horrific" derivation Clearly, all of them should have same syntax. Clearly interfaces are superfluous when abstract types could do anything they do and more. Further, interfaces are damaging to software design. One is forced permanently factor out interfaces out of types instead of trivial interface inheritance from concrete types. > What I find so interesting is that these ways to define basic types > might show that there are undeniable reasons to require two type > definition mechanisms. Really? I'd like to deny some of them. (:-)) > So maybe there is good reason to have both normal types, and tagged > types, even if this complicates the language? No, there is no substantial difference between two mechanisms, once one has separated polymorphic (class) and specific (type) as Ada 95 did, all types become "normal." Abnormal are classes, which you aren't forced to use as they are completely orthogonal to "normal" types. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de