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,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.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 Popularity Discussion Request Date: Sat, 11 Sep 2004 11:50:52 +0200 Organization: AdaCL Message-ID: <1371289.WCcgO7lass@linux1.krischik.com> References: <49dc98cf.0408110556.18ae7df@posting.google.com> <413e2fbd$0$30586$626a14ce@news.free.fr> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1094912193 05 4138 wNaeXg9lKvRGS4YR 040911 14:16:33 X-Complaints-To: usenet-abuse@t-online.de X-ID: XjXp6EZ-weZkiG4yWYtq6YBsTh+W0L46iciXaSTBnXp8OOImC9YrYo User-Agent: KNode/0.7.7 Xref: g2news1.google.com comp.lang.ada:3591 Date: 2004-09-11T11:50:52+02:00 List-Id: Kevin Cline wrote: > Georg Bauhaus wrote in message > news:... >> Kevin Cline wrote: >> : If you want bounded types in C++ it's easy enough to write a template >> : class: >> >> True, but it is not quite the same thing, is it? You can write bounded >> types in C. Yet, they don't become C language types, with ISO definded >> semantics beyond what you'd expect for any user defined type. > > The Ada designers evidently thought arrays were really really > important, because they provided elaborate language facilities to > support array-based programming. The C language designers instead > created a small but useful language. K&C was not at all usefull. Almost imediatly "lint" appeared to save you from all the pitfalls C hat. Of corse C has become more usefull But as a result it is not small anymore. The ISO/IEC 9899:1999 is just as big as the RM but mor difficult to read. And I am not aware of any compiler which supports the standard in full. > Stroustrup didn't spend much > effort on arrays, perhaps because he didn't think they were so > important. Since I do own the ISO/IEC 9899:1999 I have one to swallow for your (6.7.5.2, Page 117): extern int n; extern int m; void fcompat (void) { int a[n][6][m]; And next page it becomes even cooler: void fvla (int m; int C[m][m]); void fvla (int m; int C[m][m]); { typedef int VLA[m][m]; ... int D[m]; It looks like the C comunity have finaly found out that K&R and Stroustrup have bee wrong and arrays with bounds are important after all. > Instead he tried to make it easy to define and use new > types as easily as one could use the fundamental types. > >> Does the C++ standard directly address the behavior of handwritten >> bounded numbers? How many lines of template code will it take >> to get the effect of >> >> type A is array(Some_Index_Type) of Foo;? > > I don't know. But I do: >wc --lines AdaArray.C AdaArray.H 95 AdaArray.C 467 AdaArray.H 562 insgesamt With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com