From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8a402d78988bdf2b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-20 11:52:38 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!priapus.visi.com!orange.octanews.net!news.octanews.net!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: "Ekkehard Morgenstern" Newsgroups: comp.lang.ada Subject: Re: [announcement] SYSAPI and SYSSVC for Windows Date: Sat, 20 Dec 2003 20:52:30 +0100 Organization: 1&1 Internet AG Message-ID: References: NNTP-Posting-Host: p508c06b2.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: online.de 1071949957 13527 80.140.6.178 (20 Dec 2003 19:52:37 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Sat, 20 Dec 2003 19:52:37 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:3640 Date: 2003-12-20T20:52:30+01:00 List-Id: "Dmitry A. Kazakov" 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.