comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hyrosen@mail.com>
Subject: Re: [announcement] SYSAPI and SYSSVC for Windows
Date: Fri, 19 Dec 2003 10:15:12 -0500
Date: 2003-12-19T10:15:12-05:00	[thread overview]
Message-ID: <1071846912.728815@master.nyc.kbcfp.com> (raw)
In-Reply-To: <brumdp$lub$1@online.de>

Ekkehard Morgenstern wrote:
> For example, in Ada I can simply use a limited type when I want to prevent
> assignment to it. In C++ I have to declare a private copy constructor and
> a private copy assignment, which makes no sense really, in a logical way.

It makes a great deal of sense. You wish to prevent assignment,
and therefore you make the assignment operator inaccessible.

> And if I do want to support copying in C++, I have to write at least a 
> copy constructor and a copy assignment for every class.

No, you need to do this only when the default of memberwise-assignment
is not suitable. That implies that class is holding onto some resource
that must not be shared (such as a pointer). It's easier and better to
push down the semantics of copying that shared resource into a class of
its own (generically known as a smart pointer) instead of repeating the
code to copy it everywhere. If you find yourself creating assignment
operators and copy constructors for many classes then you are probably
designing them incorrectly.

> Template classes have nonsensical limitations

I know of several limitations, none of them particularly nonsensical.
(Here are three: 1)Floating point template parameters 2)String literal
template parameters 3)Virtual template methods.)
What exactly do you mean by this?

> (like no goto over initialization) are nonsensical

What exactly would be the semantics of a goto over an initialization?
Do you think you can jump into the middle of a scope in Ada and bypass
the elaboration of the declarations of that scope?

> To use exceptions in C++, I have to create a real exception class,
 > while in Ada I can simply declare it, which greatly speeds up
 > implementation of code supporting exceptions.

So we have an Ada proponent bashing C++ for requiring more typing
(in both senses!)? In any case, the claim is false. In Ada one writes
     Joe : exception;
     raise Joe;
     exception when Joe => ...
If you want the same thing in C++, you say
     struct Joe { };
     throw Joe();
     try { ... } catch (Joe) { ... }

> In C++, there are no built-in types for concurrent data structures and tasks,
> which means you have to use a library, which is almost never portable.

That's true.

> Especially the concurrency aspects of Ada make it ideal as a systems 
> programming and implementation language.

Except that the Ada concurrency system isn't portable either,
except to people who know exactly what they're doing. For
example, scheduling may not be pre-emptive and doing I/O may
block all tasks. And it's not especially clear that you want
to use the concurrency features of a programming language in
an operating system, which after all is there to implement this
concurrency.

> The whole OO stuff isn't really necessary for an OS. Abstraction (using types)
> and black-boxing (information hiding) is more important than proper OO
> inheritance schemes.

What does "really necessary" mean? OO stuff is useful when it's
useful. Certainly driver interfaces tend to be chock full of tables
of function pointers, which suggests that they should be implemented
through inheritance.




  reply	other threads:[~2003-12-19 15:15 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-17 19:17 [announcement] SYSAPI and SYSSVC for Windows amado.alves
2003-12-17 19:56 ` Georg Bauhaus
2003-12-18  9:08 ` Dmitry A. Kazakov
2003-12-18 12:14   ` Ekkehard Morgenstern
2003-12-18 13:31     ` Georg Bauhaus
2003-12-19 10:45       ` Ekkehard Morgenstern
2003-12-19 17:12         ` Georg Bauhaus
2003-12-19 17:22           ` Vinzent 'Gadget' Hoefler
2003-12-20  0:21           ` Ekkehard Morgenstern
2003-12-20  2:18             ` Georg Bauhaus
2003-12-20  4:40               ` Ekkehard Morgenstern
2003-12-21  3:45                 ` Georg Bauhaus
2003-12-21 19:01                   ` Piracy was " Robert I. Eachus
2003-12-18 14:32     ` Dmitry A. Kazakov
2003-12-19 11:11       ` Ekkehard Morgenstern
2003-12-19 15:15         ` Hyman Rosen [this message]
2003-12-19 15:50           ` Ekkehard Morgenstern
2003-12-19 16:48             ` Hyman Rosen
2003-12-19 16:57               ` Hyman Rosen
2003-12-20  1:17               ` Ekkehard Morgenstern
2003-12-21  2:19                 ` Hyman Rosen
2003-12-21 10:34                   ` Ekkehard Morgenstern
2003-12-22  9:02                     ` Hyman Rosen
2003-12-22 15:17                       ` Ekkehard Morgenstern
2003-12-22 15:08                     ` Hyman Rosen
2003-12-22 15:31                       ` Ekkehard Morgenstern
2003-12-22 16:35                         ` Ekkehard Morgenstern
2003-12-23  1:47                           ` Hyman Rosen
2003-12-23  8:40                             ` Ekkehard Morgenstern
2003-12-23  9:05                               ` Stephen Leake
2003-12-19 17:06         ` Dmitry A. Kazakov
2003-12-20  1:49           ` Ekkehard Morgenstern
2003-12-20 11:13             ` Dmitry A. Kazakov
2003-12-20 13:40               ` Ekkehard Morgenstern
2003-12-20 17:21                 ` Dmitry A. Kazakov
2003-12-20 19:52                   ` Ekkehard Morgenstern
2003-12-21  4:24                     ` Georg Bauhaus
2003-12-21 13:42                     ` Dmitry A. Kazakov
2003-12-21 15:48                       ` Ekkehard Morgenstern
2003-12-21 17:46                         ` Michal Morawski
2003-12-21 18:05                           ` Ekkehard Morgenstern
2003-12-22  0:50                             ` Robert I. Eachus
2003-12-23 23:02                       ` Robert A Duff
2003-12-24 11:20                         ` Dmitry A. Kazakov
2003-12-24 16:57                           ` Robert A Duff
2003-12-25 14:00                             ` Dmitry A. Kazakov
2003-12-28  1:49                       ` Dave Thompson
  -- strict thread matches above, loose matches on Subject: below --
2003-12-15 14:18 Ekkehard Morgenstern
2003-12-15 15:10 ` Ekkehard Morgenstern
2003-12-15 17:10 ` Jeffrey Carter
2003-12-15 18:38   ` Ekkehard Morgenstern
2003-12-16  0:25     ` Stephen Leake
2003-12-16  0:56       ` Ekkehard Morgenstern
2003-12-16  2:47         ` Ludovic Brenta
2003-12-16 17:45           ` Ekkehard Morgenstern
2003-12-16 19:54             ` Ludovic Brenta
2003-12-16 22:09               ` Ekkehard Morgenstern
2003-12-17 15:24                 ` Ludovic Brenta
2003-12-17 23:23                   ` Ekkehard Morgenstern
2003-12-19 18:14                   ` Warren W. Gay VE3WWG
2003-12-16  5:36         ` tmoran
2003-12-16 17:30           ` Ekkehard Morgenstern
2003-12-15 20:44 ` David Marceau
2003-12-16  0:34   ` Ekkehard Morgenstern
2003-12-17 12:05 ` Dmitry A. Kazakov
2003-12-17 15:00   ` Ekkehard Morgenstern
2003-12-20 19:24 ` Ekkehard Morgenstern
replies disabled

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