comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Generic procedures and their parameters
Date: Wed, 6 Sep 2006 17:09:53 +0200
Date: 2006-09-06T17:09:54+02:00	[thread overview]
Message-ID: <15ibl2xejtc68.1eg90p1fwn18p$.dlg@40tude.net> (raw)
In-Reply-To: edml3e$pnf$1@sunnews.cern.ch

On Wed, 06 Sep 2006 16:14:07 +0200, Maciej Sobczak wrote:

>> Why is that shaky?  Integer IS ordered.
> 
> Is it also tagged? Do you want it to be?

Not Integer, but Integer'Class.

> Integer is not only Ordered. It's also Summable, Subtractable, 
[...]

Yes, it is called multiple inheritance.

> In C++ the fact 
> that int is ordered does not require that it relates to some Ordered 
> class.

Which is unfortunate for both C++ and Ada, because "to be ordered" = "a
member of Ordered class." There is no obvious reason why they should be
different.

>> A hierarchy with Object at the top would be a Good Thing, IMHO.  Trees
>> are more aesthetically pleasing than forests.
> 
> Opinions vary on this subject. :-)

One does not exclude other. Ada provides a powerful type cloning mechanism
(I mean: type X is new Y, unfortunately not for types, which are visibly
tagged). You can take a branch and plant it as a new tree.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2006-09-06 15:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-06  8:51 Generic procedures and their parameters Maciej Sobczak
2006-09-06  9:43 ` Dmitry A. Kazakov
2006-09-06 12:36   ` Maciej Sobczak
2006-09-06 13:11     ` Robert A Duff
2006-09-06 14:14       ` Maciej Sobczak
2006-09-06 15:09         ` Dmitry A. Kazakov [this message]
2006-09-06 16:35           ` Georg Bauhaus
2006-09-07  7:32             ` Dmitry A. Kazakov
2006-09-07  6:48               ` Georg Bauhaus
2006-09-07 10:19                 ` Dmitry A. Kazakov
2006-09-08  9:11           ` Maciej Sobczak
2006-09-08 10:19             ` Dmitry A. Kazakov
2006-09-09 14:49         ` Robert A Duff
2006-09-09 15:34           ` Dmitry A. Kazakov
2006-09-09 23:26           ` Jeffrey R. Carter
2006-09-10 11:49             ` Robert A Duff
2006-09-10 19:43               ` Jeffrey R. Carter
2006-09-06 13:02   ` Robert A Duff
2006-09-06 14:09     ` Dmitry A. Kazakov
2006-09-08  3:35   ` Randy Brukardt
2006-09-08  7:21     ` Dmitry A. Kazakov
2006-09-09  1:29       ` Randy Brukardt
2006-09-09  7:14         ` Dmitry A. Kazakov
2006-09-09 14:32         ` Robert A Duff
2006-09-06 12:56 ` Robert A Duff
2006-09-07  2:47 ` Steve
2006-09-07  7:47   ` Dmitry A. Kazakov
replies disabled

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