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-Thread: 103376,fc52c633190162e0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!news.teledata-fn.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: why learn C? From: Georg Bauhaus In-Reply-To: <4eeMh.16400$bb1.2557@newssvr17.news.prodigy.net> References: <1172144043.746296.44680@m58g2000cwm.googlegroups.com> <1172161751.573558.24140@h3g2000cwc.googlegroups.com> <546qkhF1tr7dtU1@mid.individual.net> <5ZULh.48$YL5.40@newssvr29.news.prodigy.net> <4eeMh.16400$bb1.2557@newssvr17.news.prodigy.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-ID: <1174502349.9182.20.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Wed, 21 Mar 2007 19:39:09 +0100 Organization: Arcor NNTP-Posting-Date: 21 Mar 2007 19:35:10 CET NNTP-Posting-Host: 83e79eef.newsspool4.arcor-online.net X-Trace: DXC=agn=dY9TKKTHigV@eW57PQ4IUK On Wed, 2007-03-21 at 10:48 -0800, adaworks@sbcglobal.net wrote: > "Maciej Sobczak" wrote in message > > Yes, there are named parameters in Ada. And structures with named components > > in other languages. > > > This is not even an option in C/C++/Java/ or other of the C family. C99 has finally got named components, though. Consistent with the language, it doesn't seem necessary to give a value to all components of C's equivalent of aggregates: struct foo { int real_part; int surreal_part; }; typedef struct foo Foo; Foo plus(Foo a, Foo b) { const Foo result = { .real_part = a.real_part + b.real_part, // .surreal_part = a.surreal_part + b.surreal_part // fine? }; return result; }