Re: [announcement] SYSAPI and SYSSVC for Windows
From: Ekkehard Morgenstern (ekkehard.morgenstern_at_onlinehome.de)
Date: 12/20/03
- Previous message: Ekkehard Morgenstern: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- In reply to: Dmitry A. Kazakov: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- Next in thread: Georg Bauhaus: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- Reply: Georg Bauhaus: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- Reply: Dmitry A. Kazakov: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 20 Dec 2003 20:52:30 +0100
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote:
> The problem is to tell the customers, that *their* applications should be
> designed so that *our* DLLs and hardware drivers would not stray into an
> unpredictable state.
What's the problem communicating this to the customer?
> A manual reset event only needed when there could be more than one task
> waiting for the event.
Yes that, and then some. (sorry I don't have time right now to elaborate)
> > C++ is well-defined also, btw. There's already a number of ISO standards
> > for C and C++,
>
> A *number of* standards, fascinating! (:-))
For Ada, there's also an '83 and a '95 rationale. ;)
> Come on! C++ does not have:
>
> 1. multiple dispatch;
True, except for constructors and destructors. They're always called for all derived classes of an object.
Regular virtual methods have to call the methods of their parent class if so desired.
> 2. dispatch on function result;
True. Not possible w/ C++.
> 3. dispatch on access types;
False. Method overloading based on parameters of different types, even pointer types, is supported.
> 4. differentiation between class-wide and specific types;
Class-wide types in Ada roughly correspond to base classes in C++.
> 5. functions returning class-wide objects on the stack;
True, but you can return a reference to an object. (I'm not sure if passing a reference to a
temporary object would work)
> 6. streaming / object factory support ('Input, 'Output attributes in Ada);
There are provisions for that in the C++ streams standard library. But I haven't yet read
about the features in Ada you're talking about.
> 7. formal derived type parameter for generics;
False. Of course you can use derived classes or other types in templates.
> Why? The following is OK:
>
> type T is limited private;
> private
> type T is limited record
> I : aliased Integer;
Yes, but I is an Integer. Discrete types can always be aliased.
In my case, it was an array of aliased types, and I wanted to create an access
to an array element.
> "Aliased" is the keyword for that. Objects of some types are always
> aliased:
>
> type T is tagged limited ...;
so I could've just used a tagged limited record?
Like this:
type T is tagged limited
record
A : My_Array_Type;
end record;
procedure F ( O : in out T ) is
Ptr : My_Array_Cell_Ptr;
begin
Ptr := O.A(1)'Access;
end;
Right?
> And finally, if you want to get a pointer in F, then probably
>
> procedure F (O : access T);
>
> is reasonable.
Unfortuantely I cannot pass this on to the entry points of my task. ;)
So I decided to use a regular access types and Limited_Controlled types.
- Previous message: Ekkehard Morgenstern: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- In reply to: Dmitry A. Kazakov: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- Next in thread: Georg Bauhaus: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- Reply: Georg Bauhaus: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- Reply: Dmitry A. Kazakov: "Re: [announcement] SYSAPI and SYSSVC for Windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]