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,11414a19b0e4a97a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!192.87.166.28.MISMATCH!tudelft.nl!txtfeed1.tudelft.nl!feeder.erje.net!news2.arglkargh.de!news.n-ix.net!news.belwue.de!kanaga.switch.ch!switch.ch!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Advice on selling Ada to a C shop Date: Wed, 23 Jun 2010 17:33:40 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <101bf8f3-b823-45ee-9afd-40cbafb4b7a9@t26g2000prt.googlegroups.com> <774c25c4-3270-4ffb-ad19-366a0ab16659@i31g2000yqm.googlegroups.com> <4c22669b$0$3623$4d3efbfe@news.sover.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1277328805 16743 192.74.137.71 (23 Jun 2010 21:33:25 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 23 Jun 2010 21:33:25 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:z4WI/MMbXDsLZS75LxtI/Xqls3M= Xref: g2news2.google.com comp.lang.ada:12877 Date: 2010-06-23T17:33:40-04:00 List-Id: "Peter C. Chapin" writes: > I wasn't involved in the discussion that lead to the decision to include > conditional expressions in Ada, but my impression is that they were > introduced in large measure to make the new pre- and post-conditions more > expressive. Yes, that's a big part of the reason. One use for them is to express logical implication. ARG considered, and rejected, the idea of adding an "implies" operator. Instead, you can say something like: procedure P (...) with Pre => (if X > 10 then Y > 10); The "else True" is implied here. So it means the same as what "X > 10 implies Y > 10" would mean if "implies" were in the language. This is not (yet) Ada! It is proposed for Ada 2012. > In any case conditional expressions are entirely normal in functional > languages and widely implemented by such languages. They are not some sort of > C quirk as you seem to suggest. I'm not suggesting that Ada should become a > functional language (lambdas, anyone?) but to a person fluent with functional > programming such expressions are very natural. Lambdas should indeed be added to Ada, IMHO, and they have been discussed by ARG. I forget the status, but I don't think they'll make it in. We had a lot of trouble coming up with a readable syntax, for one thing. (And nobody proposed any syntax involving a "lambda" keyword.) But to be a true functional language Ada would need more than that. Full closures, for example. And those pretty much require garbage collection. - Bob