comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada 2005 puzzle
Date: Sat, 28 Jul 2012 12:37:21 +0200
Date: 2012-07-28T12:37:21+02:00	[thread overview]
Message-ID: <2dyx4yaenfz9$.ldh4ahlp469f.dlg@40tude.net> (raw)
In-Reply-To: a43a3b4b-efeb-475f-9c5d-d19232c91c1c@googlegroups.com

On Sat, 28 Jul 2012 02:48:43 -0700 (PDT), AdaMagica wrote:

> On Friday, July 27, 2012 3:04:12 PM UTC+2, Dmitry A. Kazakov wrote:
>> If you cannot derive? Primitive operations make little sense if there is
>> only one type.
>>
>> Abstract types fall short either because you could not have:
>>
>>    type T is abstract ... with private;
>>    function Create (...) return T; -- Non-abstract
>>       -- initializes private parts of T, called from the overriding
>>
>> The stuff just does not make any sense to me.
> 
> I see what you mean. But since no objects of abstract types may exist and
> somehow you have to provide the private components of derived nonprivate
> objects, the proper Ada way (as intended by ARG, I guess) is child
> packages.

That changes nothing. An abstract type remains abstract. You can derive a
non-abstract (and thus necessarily broken) type from it and expose the
latter.

And you forgot that this was not intended to work anyway. Because a limited
derived object cannot be created this way. Which is so far the
authoritative answer.

It was the starting point of the discussion that the kludge is useless for
object creation. Georg suggested a case of a flat type hierarchy (one type)
where it might be used. I answered that with one type you need no primitive
operations at all. And if it were just a bit thicker: 1 abstract + 1
concrete it would not work already.

So whatever use it might have it is clearly marginal. Introducing an
extremely difficult to implement and semantically twisted features for this
single case, there must have been mass demonstrations of customers on the
streets seven years ago! (:-))

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



  reply	other threads:[~2012-08-01  2:50 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 12:54 Ada 2005 puzzle Dmitry A. Kazakov
2012-07-12 15:48 ` Adam Beneschan
2012-07-12 16:34   ` Dmitry A. Kazakov
2012-07-19  6:53     ` Randy Brukardt
2012-07-19  7:55       ` Dmitry A. Kazakov
2012-07-20  2:22         ` Randy Brukardt
2012-07-20  7:20           ` Dmitry A. Kazakov
2012-07-21  0:04             ` Randy Brukardt
2012-07-21  8:34               ` Dmitry A. Kazakov
2012-07-24  2:38                 ` Randy Brukardt
2012-07-24  4:23                   ` Adam Beneschan
2012-07-24  7:54                     ` Dmitry A. Kazakov
2012-07-25 23:39                       ` Randy Brukardt
2012-07-26  7:41                         ` Dmitry A. Kazakov
2012-07-26 13:08                           ` Simon Wright
2012-07-26 13:55                             ` Dmitry A. Kazakov
2012-07-27  9:42                               ` AdaMagica
2012-07-27 10:32                                 ` Dmitry A. Kazakov
2012-07-27 11:58                                   ` Georg Bauhaus
2012-07-27 13:04                                     ` Dmitry A. Kazakov
2012-07-28  9:48                                       ` AdaMagica
2012-07-28 10:37                                         ` Dmitry A. Kazakov [this message]
2012-07-28 16:59                                           ` AdaMagica
2012-07-28 18:21                                             ` Dmitry A. Kazakov
2012-07-19  8:04       ` Maciej Sobczak
     [not found]         ` <juaghb$fv9$1@munin.nbi.dk>
2012-07-20  7:30           ` Dmitry A. Kazakov
2012-07-21 17:21             ` Vasiliy Molostov
2012-07-21 19:03               ` Dmitry A. Kazakov
2012-07-21 19:37                 ` Vasiliy Molostov
2012-07-21 20:23                   ` Dmitry A. Kazakov
2012-07-21 20:53                     ` Vasiliy Molostov
2012-07-22  7:41                       ` Dmitry A. Kazakov
2012-07-22  8:00                         ` Vasiliy Molostov
2012-07-22  8:19                           ` Dmitry A. Kazakov
2012-07-22  9:06                             ` Vasiliy Molostov
2012-07-22  9:34                               ` Dmitry A. Kazakov
2012-07-20  8:09           ` Maciej Sobczak
2012-07-20  8:27             ` Dmitry A. Kazakov
2012-07-20 11:30               ` Maciej Sobczak
2012-07-20 12:49                 ` Dmitry A. Kazakov
2012-07-21 22:46                   ` Maciej Sobczak
2012-07-22  8:03                     ` Dmitry A. Kazakov
2012-07-22 10:08               ` Florian Weimer
2012-07-22 11:18                 ` Dmitry A. Kazakov
2012-07-21  0:12             ` Randy Brukardt
2012-07-22  9:52       ` Florian Weimer
replies disabled

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