comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Ada OS based on Minix3
Date: Tue, 11 Nov 2008 17:09:54 -0500
Date: 2008-11-11T17:09:54-05:00	[thread overview]
Message-ID: <wcc3ahxncct.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 14t6hwu8udm8j$.1x339y69m2ew1.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On Mon, 10 Nov 2008 10:31:27 -0500, Robert A Duff wrote:
>
>> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
>> 
>>> 6. Proper construction/destruction
>> 
>> What do you see as the limitations/problems with Ada in this area?
>
> 1. User-defined initialization/finalization shall be definable for any
> type. I do mean any.

Finalization: Agreed, but the compiler really needs to take care to
avoid distributed overhead.

Initialization: Use function calls.  They work for all types.
I think we've discussed this idea before, but I don't remember
any fundamental problems.  The Initialize procedure of controlled
types seems unnecessary to me (although something needs to be done
regarding abort deferral).

> 2. Composition rules of initialization/finalization for derived types must
> ensure execution of the user-defined initialization/finalization code for
> the base type.

Agreed (except I think you mean "parent type", not "base type").
This is a more general issue -- it would be useful to say
"must call parent op" for various things, including Finalize.

> 3. User-defined initialization/finalization shall be definable for
> class-wide types. AKA dispatch from constructor/destructor. Actually, a
> part of the pos. 1.

OK.  There are some interesting issues here -- the constructor (a
function, in my mind) might want to plug a pointer-to-classwide into
some global data structure, but I want to make sure the specific-typed
thing is fully initialized and ready to be dispatched to, before that
happens.

> 4. Task-as-a-component problem to be solved.

Which problem is that?

> 5. Getting a pool-specific pointer to the object upon
> initialization/finalization, when the object is allocated in such a pool.
> (Unchecked_Conversion is really nasty there)

I think you mean Unchecked_Access -- Unchecked_Conversion is not
necessary.

I don't see how this can make sense.  In Initialize or Finalize, you
don't know whether the object is in a pool, nor which pool.  So how can
you get a pool-specific pointer?

Also, given point 1 ("any type") the thing being init/finalized could be
a bitfield component of a packed record.  Pointers to bitfields could
cause distributed overhead, if you're not careful.

> 6. LHS/RHS issue.

What issue is that?

How about:

7. It would be nice if Finalize would be passed a parameter indicating
   the reason for finalization (normal exit, some exception occurrence,
   abort).  Perhaps also an ability to declare that finalization only
   applies to certain "reasons".

8. Interactions with user-defined storage pools.

9. Interactions with garbage collection.

10. Reify the finalization operation (that is, the operation on some
    type that calls Finalize on all the parts of it, including the
    whole).

- Bob



  reply	other threads:[~2008-11-11 22:09 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 14:10 Ada OS based on Minix3 Cedric.Lannock
2008-11-07 16:20 ` xavier grave
2008-11-08  3:46 ` anon
2008-11-10  8:12 ` Ivan Levashew
2008-11-10  8:58   ` Dmitry A. Kazakov
2008-11-10  9:26     ` Ivan Levashew
2008-11-10 10:11     ` Georg Bauhaus
2008-11-10 10:24     ` Jacob Sparre Andersen
2008-11-10 10:51       ` Dmitry A. Kazakov
2008-11-10 11:07         ` Ludovic Brenta
2008-11-10 11:42           ` Ivan Levashew
2008-11-10 12:04             ` Ludovic Brenta
2008-11-11 22:16           ` Robert A Duff
2008-11-12  6:28             ` Ivan Levashew
2008-11-10 10:50     ` Ivan Levashew
2008-11-10 11:01       ` Dmitry A. Kazakov
2008-11-10 15:31         ` Robert A Duff
2008-11-10 15:56           ` Dmitry A. Kazakov
2008-11-11 22:09             ` Robert A Duff [this message]
2008-11-12  9:47               ` Dmitry A. Kazakov
2008-11-13  0:58                 ` Randy Brukardt
2008-11-13 17:28                   ` Dmitry A. Kazakov
2008-11-13 23:25                     ` Randy Brukardt
2008-11-14  9:30                       ` Dmitry A. Kazakov
2008-11-14 23:11                 ` Robert A Duff
2008-11-15 10:04                   ` Dmitry A. Kazakov
2008-11-15 11:57                     ` Programmer controlled object creation (was: Re: Ada OS based on Minix3) Georg Bauhaus
2008-11-15 12:44                       ` Programmer controlled object creation Dmitry A. Kazakov
2008-11-10 10:18   ` Ada OS based on Minix3 Georg Bauhaus
2008-11-11  1:00 ` Freejack
2008-11-11  8:32 ` Martin Krischik
2008-11-11 11:09   ` Peter C. Chapin
2008-11-11 11:59     ` Georg Bauhaus
2008-11-11 14:35       ` Ludovic Brenta
2008-11-11 16:49         ` Georg Bauhaus
2008-11-13  7:10         ` Martin Krischik
2008-11-13  7:01       ` Martin Krischik
2008-11-13  6:48     ` Martin Krischik
2008-11-13  8:09       ` Thomas Locke
2008-11-13 10:16         ` Alex R. Mosteo
replies disabled

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