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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,131f06967722ab4b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Ada 2005? Date: Fri, 24 Dec 2004 10:59:39 +0100 Organization: None Message-ID: <1477187.tMvEnZyZN3@linux1.krischik.com> References: <1103344064.372396.51420@c13g2000cwb.googlegroups.com> <1n1v6175zrtcc.2g6ewdvu7ei5$.dlg@40tude.net> <1103568585.285484.237450@c13g2000cwb.googlegroups.com> <17804669.eaDZ45aH7Z@linux1.krischik.com> <1103843104.929545.135150@z14g2000cwz.googlegroups.com> Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1103884612 03 18478 7HqZrkdvBD6lV5x 041224 10:36:52 X-Complaints-To: usenet-abuse@t-online.de X-ID: TJfH-mZEQeKSxVGk+cJ8AjehvsCyHNr4+CKue86AjW6EV1YH0JMXrf User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:7205 Date: 2004-12-24T10:59:39+01:00 List-Id: conradwt@runbox.com wrote: > Hi, thanks for all your comments. It's simply clearer to me as to what > you're doing. Now, in regards to your example, a struct in C and C++ > are very different. For example, a struct C cannot contain functions > within its declaration. Most programmers in the C++ community would > use a class to create C++ object types that contain methods because the > struct keyword is somewhat confusing when moving from C to C++ (i.e. do > you mean a C struct or a C++ struct). That is indeed true. But somehow typical for C/C++. Originally designed to be slim and lightweight they have become the total opposite. The C99 standart if only a few pages short of Ada95 - But Ada has tasking and object orientation included. And the C++ standart is +200 pages on Ada95. > Thus, I think that they should > not have extended 'struct' in regards to the C++ language. YES! i.E. When has a struct/class a virtual functions table? In Ada it is clear: when you us the keyword tagged. In C++: when there is at least on virtual function - something difficult to dertemine. But more difficult: When can you use dynamic_cast <> ;-) In Ada: allways. even casting integers is dynamicly checked. I think here was a great opertunity missed: long x(); short Y = dynamic_cast x(); (And Yes, I do have a template for this - its called numerc_cast , actually quite tricky to implement) With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com