comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada OOP alternatives?
Date: Fri, 18 Jul 2008 15:36:28 +0200
Date: 2008-07-18T15:36:28+02:00	[thread overview]
Message-ID: <17tobt9v001dx$.1olg7gsbddl85$.dlg@40tude.net> (raw)
In-Reply-To: wcc1w1rpd29.fsf@shell01.TheWorld.com

On Fri, 18 Jul 2008 08:54:54 -0400, Robert A Duff wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> 
>> There are two problems with that. The first one is that the difference is
>> not obvious. Why legality check is less than "full compilation", so that
>> the delta cannot be left for the binder/linker. The second one is that if
>> the delta is sufficient, then the reader should probably become aware of
>> it. In short, it is difficult to drive a margin.
> 
> I don't understand.  To (e.g.) determine whether a procedure call is
> legal, you need to know its name, parameter types, etc.  (Whether "you"
> is the human or the compiler.)  To generate code, you need to know more
> -- which register to put the parameter in, etc

But call convention could be a subject of specification (choosing pragmas
for that was probably a mistake). Register allocation can be postponed (if
the architecture supports renaming) etc. It is not obvious why namely the
body shall determine such things.

> -- and if inlined, what code is in the body.

Inlining should not influence the semantics. Thus if the body is not
available, the client should still be compilable.

>>> The compiler should check legality without looking at other bodies.  But
>>> it should look at bodies when generating code (at least if optimization
>>> is turned on).
>>
>> But what would you do with dynamically linked libraries, remote partitions
>> and other lately bound stuff?
> 
> I don't see what that has to do with organization of the source code.
> These things are implemented using "extra" levels of indirection at run
> time.  E.g. you can't very will inline a call in an executable, and then
> expect that updating a shared library used by that executable will
> update the call by magic.  So don't inline across such boundaries.

I don't want such decisions to propagate into specifications. To me it is
an implementation detail. If an ability to compile without the bodies is
not constant, then something in the specifications shall tell if it is a
pure specification or else that the body will be required. I don't like
this. It would mean mixing interfaces and implementations.

>>... I think that the time of monolithic systems
>> is gone.
> 
> I don't think so.  Certainly some embedded systems are monolithic,
> and should be.

Maybe, though, newer embedded systems have to communicate with other
systems in the outer world. Anyway, Ada is a general purpose language. I
buy some performance loss if it comes to cleaner separation of interface
and implementations. Baked sand is cheap... (:-))

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



  reply	other threads:[~2008-07-18 13:36 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 [this message]
2008-07-17 23:27                 ` Randy Brukardt
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