comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hyrosen@mail.com>
Subject: Re: [announcement] SYSAPI and SYSSVC for Windows
Date: Sun, 21 Dec 2003 02:19:51 GMT
Date: 2003-12-21T02:19:51+00:00	[thread overview]
Message-ID: <br7Fb.2922$eE3.2907@nwrdny03.gnilink.net> (raw)
In-Reply-To: <bs08rt$16h$1@online.de>

Ekkehard Morgenstern wrote:
> Yeah, say, you have hundreds of classes that use pointers.

If you have them, then you already have code that deals with
them. If you are having to deal with an existing bad design,
then you have a bunch of work ahead of you to fix it. But
"hunfreds of classes that use pointers" doesn't just happen,
someone bad was responsible for creating them.

> This is something that is elegantly solved in Ada with the access type.
> You simply assign and Ada keeps track of the reference.

Say what? An access type is a pointer, nothing more. Ada doesn't keep
track of anything! (Well, if the storage pool goes out of scope, or
soemthing like that, I think Ada frees all the memory in the pool, but
I don't think that's what you're talking about.)

> Or are there other ways to do that that I'm unaware of?

As I said above, I think you are extremely confused about what Ada
does when you copy access types.

> But if all your classes depend on pointers, then you have to write
> copy assignment and copy constructor for all of your classes,
> no matter whether you use smart pointers.

Your classes should not depend upon pointers (unless none of them own
the memory, so that simply copying the pointer is OK). If an object
owns the memory that its member pointer is addressing, then the pointer
should be wrapped up in a smart pointer that will orchestrate the copying
policy. Then the class containing that smart pointer doesn't need a
copy constructor or assignment operator to be user-written. The compiler-
generated one will work properly. And you don't have to write your own
smart pointers. Just go to Boost and use one of theirs.

> For not permitting string literals or floating-point values in
> templates, there's no excuse, really.
> These values are not uncomparable per se, a distinct string constant
> or a distinct floating-point value is still distinct.

Template parameters can be expressions. Allowing floating point
parameters would require discussing the issue of whether x<1.0>
and x<1.0/3.0 + 1.0/3.0 + 1.0/3.0> are the same type or not. It's
doable, but there's enough work involved that they just punted.

Template parameters which are addresses are supposed to be of
objects with external linkage, which string literals are not.
Instead of x<"joe"> you can do char joe[] = "joe"; x<joe>;

> What is a "template method of a class" for you?
> Something like
>     class X {
>         template <int a, int b> void func( ... );
>     };

Yes, exactly. Such a member function template cannot be virtual.

> Or some other rule.

Think of what you're asking - you want people to devote time to
complicated rules about when jumping into the middle of a scope
is legal. If you push them enough, they would just outlaw it
altogether!

> My Ada development-system will have its own database engine and hence
> project management will be a piece of cake. Plus, it will probably be
> freeware or shareware or open-source.

Well, there's already a free-software Ada compiler. Why don't you just
use it as a base for your work instead of trying to recreate all the
knowledge that has gone into making it what it is? A fundamental mistake
made by many programmers is to believe that they can "do it better". They
fail to realize that an existing system may be large and complicated
because it has been modified to handle complex issues and problems that
they do not know about. It's like evolution. The process of modifying
software breeds instincts and behavior into the code which represents
internalized and implicit knowledge of the world. A new project won't
have that.

What you will need to do most of all is to start with small projects
which immediately work and do something useful. If you begin with anything
huge you will never complete it.

> The programming language isn't what matters. All that matters is the
> OS concept itself, whether it will be successful.

All that matters is the execution - the OS must deliver what it promises.
Microkernels are a great OS concept, but they have failed to be the base
of a successful OS.

> Since my project (DELOS) is only my own endeavour so far, I don't think
> it'll have any impact on the software industry.

Yeah, that's what Linus thought!

> Well, you'd be surprised how fast I learn. ;)

No matter how fast you learn, it takes a good long while before it seeps
into your bones.



  reply	other threads:[~2003-12-21  2:19 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
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 [this message]
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