comp.lang.ada
 help / color / mirror / Atom feed
From: "Chris Campbell" <chris.danx@ntlworld.com>
Subject: Re: Ada Microkernel?
Date: Sun, 10 Jun 2001 02:16:34 +0100
Date: 2001-06-10T02:16:34+01:00	[thread overview]
Message-ID: <YSzU6.96$6d5.30076@news2-win.server.ntlworld.com> (raw)
In-Reply-To: AGyU6.55016$DG1.9005577@news1.rdc1.mi.home.com

> Most people assume that OOP code is slow, which happens to be thier main
> objection to using for system level stuff such as kernels and drivers and
> such.(Which is the position I'm assuming your coming from. I could be
> mistaken.)

My position is not that OO = slow but more a question of organisation.  At some
low levels OO is not really necessary, but at higher levels i can see where OO
could be useful.  I'm against OO all the code and if it was to be used only in
situations where it is appropriate to do so.  This is the Java and Smalltalk
approach, Ada on the other hand gives you a choice making it very flexible.  If
you don't need OO you don't _have_ to use it.

One of the problems I have is designing suitable OO hierachies if this is
necessary (OO has benefits other than inheritance which people mostly forget.
OO /= inheritance, indeed we use a mechanism that mimics of inheritance with
sets in maths).

Usually i either abstract the hierachy too much or not enough, never seem to get
the balance right.  It's costly to have to redesign the hierachy (in my case
Time, but for others it could be money) and this is one reason why i don't use
it much.  I also object to people getting lazy and using classes that have kinda
what they need but not quite and adding functionality to the class that's
completely inappropriate.  Like reusing a soldier class for kangaroos! -- don't
know if that story was true but it was funny!


> OOP code itself is not inherently slow, but rather it happens to be a
> result of the compiler or interpreter being used.

That brings up an interenting point about Ada compilers and OO, specifically
GNAT which is what most use i think.  I see very little in the Ada 95 language
design that would need tied to an OS, but how much is there in practise?  There
is no point saying use OO in the kernel if the compiler uses some system
specifics to achieve it.  The only solution would be to modify GNAT which would
be costly if it did need it.  I ask since ppl have been pointing out the
_potential_ uses for OO in the OS in other and in this group(s), and i plan to
modify GNAT to support exceptions -- or more specifically the reporting of
exceptions -- without the need for system specifics.  I might be willing to do
something similar for objects if it's possible and providing it would be of
benefit to ppl.  I won't do it if it's like C++ RTTI and will need substantial
modifications to make it run.  Hopefully considering Ada's embedded and systems
programming history this won't be an issue though.


> Also the language used
> in the implementation can cause problems
> (such as trying to use Java or God forbid Visual Basic.) when creating
> something such as a Kernel or a device driver.(At least that's been my
> experience.)

I was going to write something but i thought better of it since it could turn
into one of those pointless "my language is better than yours" threads like that
Algol thread that never ends on another newsgroup -- it's been there for ages
and ages.


> Using Ada95 in an OOP fashion seems to complement the MicroKernel concept
> nicely. Heck, if done right, one could compile new code into a running
> kernel without messing  with installing a totally new kernel at all.

That's going to be difficult but not impossible, we discussed a similar idea as
part of Voyager OS -- i went off on my own since the other guy wanted to use C
and changed to making a clonix, but the idea remains in Sorcerer.  If this
feature makes it's way into any OS, it'll save ppl alot of headaches and will
make development easier.  One point:  if the new module is faulty or
incompatible it'd be a good idea to revert back to the last version if possible.
This will be quite difficult and costly -- you could lose running apps because
the two schemes are incompatible -- but will need doing just in case.  Hopefully
the programmers who wrote the module will have done their job properly and it
will "never happen".

> Using Ada95 OOP would have the major benefit of people being able to
> actually maintain the code. They could focus on thier section of the code
> without having to worry too much  about what other sections of the code
> are doing.

hmm... i'm not sure about all this OO stuff now i'll need to think about it.


> Blah. I'm still researching the subject. A more coherent explanation will
> be forthcoming.

Please don't keep us waiting too long... it's not often you get someone who's
interested in Ada and microkernels, normally it's just C and microkernels...



Chris Campbell





  reply	other threads:[~2001-06-10  1:16 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-02  1:09 Ada Microkernel? B. Douglas Hilton
2001-06-02  2:11 ` DuckE
2001-06-02  2:25 ` Gerhard Häring
2001-06-02  2:41 ` Ted Dennison
2001-06-02  5:09   ` Dale Stanbrough
2001-06-02 21:31   ` B. Douglas Hilton
2001-06-02 23:21     ` chris.danx
2001-06-02 11:07 ` chris.danx
2001-06-02 20:30   ` McDoobie
2001-06-02 21:20     ` B. Douglas Hilton
2001-06-02 21:41       ` B. Douglas Hilton
2001-06-03  1:09         ` James Rogers
2001-06-02 23:00       ` chris.danx
2001-06-03  5:31         ` B. Douglas Hilton
2001-06-03 11:45           ` chris.danx
2001-06-03 22:54             ` Didier Utheza
2001-06-03 23:23               ` Florian Weimer
2001-06-04 14:37       ` Ted Dennison
2001-06-04 11:52     ` Chris Campbell
2001-06-09 23:54       ` McDoobie
2001-06-10  1:16         ` Chris Campbell [this message]
2001-06-10  7:13           ` Gerhard Häring
2001-06-10 12:14             ` Samuel Tardieu
2001-06-10 17:00             ` chris.danx
2001-06-11 20:54               ` chris.danx
2001-06-11 20:58                 ` chris.danx
2001-06-11 22:30                   ` tmoran
2001-06-11 22:35                     ` chris.danx
2001-06-11 23:24                   ` Robert A Duff
2001-06-12 20:57                   ` Randy Brukardt
2001-06-11 21:38                 ` Ted Dennison
2001-06-11 21:44                   ` chris.danx
2001-06-12  3:09                     ` DuckE
2001-06-12 10:39                       ` Jeff Creem
2001-06-11 23:22                 ` Robert A Duff
2001-06-12  9:58                   ` chris.danx
2001-06-12 17:27                     ` tmoran
2001-06-13 10:31                     ` Colin Paul Gloster
2001-06-23 14:58                     ` Stefan Skoglund
2001-06-24  0:22                       ` B. Douglas Hilton
2001-06-28  8:30                       ` Fr�d�ric BOYER
2001-06-28  9:50                         ` M. A. Alves
2001-06-28 14:21                           ` Ted Dennison
2001-06-28 14:39                             ` Wes Groleau
2001-06-28 15:01                             ` Marin David Condic
2001-06-28 17:45                               ` Tarjei Tj�stheim Jensen
2001-06-28 19:03                                 ` Marin David Condic
2001-06-28 19:15                                   ` Marin David Condic
2001-06-28 21:52                                     ` Ted Dennison
2001-06-29 13:16                                       ` Marin David Condic
2001-06-29 14:59                                         ` Ted Dennison
2001-06-29 15:22                                           ` Marin David Condic
2001-06-29 18:21                                             ` Ted Dennison
2001-07-02 13:50                                               ` Marin David Condic
2001-07-02 16:57                                                 ` OPERA
2001-06-29  4:37                                     ` Brian Catlin
2001-06-29 13:18                                       ` Marin David Condic
2001-06-29 15:09                                       ` Ted Dennison
2001-06-29  2:45                               ` Gerhard Häring
2001-06-29  2:32                             ` Gerhard Häring
2001-06-28 10:55                         ` chris.danx
2001-06-28 17:55                         ` Tarjei Tj�stheim Jensen
2001-06-29 10:29                           ` Fr�d�ric BOYER
2001-07-02  7:13                             ` Tarjei T. Jensen
2001-06-29 14:26                           ` Ted Dennison
2001-07-02  7:11                             ` Tarjei T. Jensen
2001-07-02 13:25                               ` Ted Dennison
2001-07-05 21:37                                 ` Tarjei Tj�stheim Jensen
2001-07-07 23:22                             ` Stefan Skoglund
2001-07-09 13:51                               ` Ted Dennison
2001-06-11 14:53           ` Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
2001-07-03 18:05 Michael Erdmann
2001-07-03 18:20 ` Ted Dennison
replies disabled

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