comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: The A-Z of Programming Languages: Ada, interview with S. Tucker Taft
Date: Thu, 5 Jun 2008 22:46:23 +0200
Date: 2008-06-05T22:46:22+02:00	[thread overview]
Message-ID: <o4650puv7tb0$.1rlwmqcw9yoc.dlg@40tude.net> (raw)
In-Reply-To: 48484147$0$7547$9b4e6d93@newsspool1.arcor-online.net

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



  reply	other threads:[~2008-06-05 20:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04 10:52 The A-Z of Programming Languages: Ada, interview with S. Tucker Taft Ludovic Brenta
2008-06-04 14:14 ` Georg Bauhaus
2008-06-04 14:59   ` Ludovic Brenta
2008-06-05  2:01     ` Marc A. Criley
2008-06-05 13:58       ` Georg Bauhaus
2008-06-05 14:13         ` Jean-Pierre Rosen
2008-06-05 19:40           ` Georg Bauhaus
2008-06-05 20:46             ` Dmitry A. Kazakov [this message]
2008-06-06 17:57               ` Georg Bauhaus
2008-06-06 19:34                 ` Dmitry A. Kazakov
2008-06-05 15:00         ` Ed Falis
2008-06-12  1:57           ` Randy Brukardt
2008-06-12  7:25             ` christoph.grein
2008-06-06 14:09 ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox