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,cced0e2ac94722f3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.117.197 with SMTP id kg5mr7163137pbb.5.1326090097326; Sun, 08 Jan 2012 22:21:37 -0800 (PST) MIME-Version: 1.0 Path: lh20ni158927pbb.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada2012 : Expression functions and extended return statements Date: Mon, 9 Jan 2012 00:21:34 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <26f343ea-d694-4089-b594-f32b471db3a4@m4g2000vbc.googlegroups.com> <50ec6d9a-5062-477f-826f-239fd2712a09@f11g2000yql.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1326090095 18312 69.95.181.76 (9 Jan 2012 06:21:35 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 9 Jan 2012 06:21:35 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-01-09T00:21:34-06:00 List-Id: "Martin" wrote in message news:50ec6d9a-5062-477f-826f-239fd2712a09@f11g2000yql.googlegroups.com... On Jan 7, 1:50 am, "Randy Brukardt" wrote: >> >> In Ada, we favour the reader over the writer, don't we? >> >> >Not necessarily, with the advent of expression functions!! ;-) >> >> Huh? An expression function is just a shorthand for writing a simple >> function; it argubly easier to read because it has less noise. "begin" >> "end" >> "return" don't add much information here, and you still can add the >> whitespace if you think it helps readability. > >http://groups.google.com/group/comp.lang.ada/browse_frm/thread/4bb12335caa3231a/91a870f32263ab04?>lnk=gst&q=enjoying#91a870f32263ab04 > >:-O The expression functions have nothing to do with the readability issues here, it is intentionally confusing use of case and if expressions (that is, conditional expressions). These aren't the same thing, you know. I'd have had more sympathy if you had commented on conditional expressions; I do think you have to use them carefully in order to avoid a mess. (But avoiding them can easily lead to a bigger mess, such as the idioms for writing static expressions that effectively contain conditional expressions.) But that has nothing to do with expression functions. Randy.