From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada OOP alternatives?
Date: Thu, 17 Jul 2008 18:27:03 -0500
Date: 2008-07-17T18:27:03-05:00 [thread overview]
Message-ID: <g5oklk$3sg$1@jacob-sparre.dk> (raw)
In-Reply-To: wccy741fg0z.fsf@shell01.TheWorld.com
"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message
news:wccy741fg0z.fsf@shell01.TheWorld.com...
> "(see below)" <yaldnif.w@blueyonder.co.uk> writes:
>
>> On 17/07/2008 01:05, in article wcc3am9gytt.fsf@shell01.TheWorld.com,
>> "Robert A Duff" <bobduff@shell01.TheWorld.com> wrote:
>>> I'd still rather eliminate private parts altogether.
>>
>> How would you do that while allowing ADT clients to access objects
>> directly
>> (i.e. not via a pointer a la Java)?
>
> I'd have the compiler take a peek at the body when compiling the client.
> After all, that's what Ada compilers already do for pragma Inline.
That's what *some* Ada compilers do. Personally, I think that violates the
spirit of Ada (Ichbiah version) by adding unnecessary compilation
dependencies. Indeed, I think the whole design of pragma Inline is wrong in
Ada.
...
> We're just talking about the size of the type, really -- you say
> "access objects", but clients can't access the record components
> of a private type -- all they can do is declare objects and
> pass them around.
Ugh. That's surely not true, either, unless you insist on allocating all
objects contiguously. And I see absolutely no reason to do that in
general -- the limitations that it puts on the programmer are unnecessary
and impossible to see. (Particular cases for particular [usually
safety-critical] programs are a very different story of course -- but
safety-critical users are going to put all kinds of restrictions on
themselves which don't mean that they are a good idea for the rest of us.)
There are a lot of different ways to design a compilation system, and one
thing we've clearly learned from the ARG is that making any sort of
assumptions about how "everyone" is going to implement something are almost
certainly wrong. Language design has to be more general than that (unless
you are willing to have a sole-source language like Eiffel, and those are
almost never interesting).
Randy.
next prev parent reply other threads:[~2008-07-17 23:27 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 20:38 Ada OOP alternatives? raould
2008-07-16 0:15 ` Robert A Duff
2008-07-16 6:33 ` Georg Bauhaus
2008-07-16 9:54 ` Alex R. Mosteo
2008-07-16 13:03 ` Dmitry A. Kazakov
2008-07-16 14:07 ` Robert A Duff
2008-07-16 18:11 ` (see below)
2008-07-17 0:05 ` Robert A Duff
2008-07-17 0:43 ` (see below)
2008-07-17 1:36 ` Robert A Duff
2008-07-17 11:07 ` (see below)
2008-07-17 16:45 ` Robert A Duff
2008-07-17 12:00 ` Dmitry A. Kazakov
2008-07-17 16:50 ` Robert A Duff
2008-07-17 18:56 ` Dmitry A. Kazakov
2008-07-18 12:54 ` Robert A Duff
2008-07-18 13:36 ` Dmitry A. Kazakov
2008-07-17 23:27 ` Randy Brukardt [this message]
2008-07-18 12:45 ` Robert A Duff
2008-07-18 23:22 ` Randy Brukardt
2008-07-22 20:32 ` Adam Beneschan
2008-07-22 22:18 ` Ludovic Brenta
2008-07-23 9:25 ` Alex R. Mosteo
2008-07-22 23:35 ` Randy Brukardt
2008-07-23 7:56 ` Dmitry A. Kazakov
2008-07-23 21:04 ` Robert A Duff
2008-07-24 7:07 ` stefan-lucks
[not found] ` <5ob7w7usrc74$.kms2e1vqs4k0.dlg@40tude.net>
[not found] ` <48883529$0$18826$9b4e6d93@newsspool2.arcor-online.net>
[not found] ` <ygdmhl22lzh4$.1dx98hja6p2o6.dlg@40tude.net>
[not found] ` <48883f41$0$18829$9b4e6d93@newsspool2.arcor-online.net>
[not found] ` <6i1s0y8eeka.121ek9qcgunha$.dlg@40tude.net>
[not found] ` <48885757$0$18818$9b4e6d93@newsspool2.arcor-online.net>
2008-07-24 12:48 ` Dmitry A. Kazakov
2008-07-25 8:47 ` Georg Bauhaus
2008-07-25 13:28 ` Dmitry A. Kazakov
2008-07-25 16:24 ` Georg Bauhaus
2008-07-25 17:55 ` Dmitry A. Kazakov
2008-07-26 5:05 ` Jeff Koftinoff
2008-07-16 14:03 ` Robert A Duff
2008-07-16 14:29 ` 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