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.213.99 with SMTP id nr3mr10169896pbc.2.1326095877563; Sun, 08 Jan 2012 23:57:57 -0800 (PST) Path: lh20ni159172pbb.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 09 Jan 2012 01:57:56 -0600 User-Agent: NewsTap/3.5.1 (iPad) From: Martin Dowie Newsgroups: comp.lang.ada Mime-Version: 1.0 Message-ID: <1444231023347788223.596944martin-re.mo.ve.thedowies.com@news.btinternet.com> Subject: Re: Ada2012 : Expression functions and extended return statements References: <50ec6d9a-5062-477f-826f-239fd2712a09@f11g2000yql.googlegroups.com> Date: Mon, 09 Jan 2012 01:57:56 -0600 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-nRgN0UA4JQucAEpUpyQfw6mqoM1az4aumcOP1fPo6gpenRe4QESCUDnX+vg8JNO+L4Rf3zxKOPLy7C1!dncHBHSsV3iIG/o/3Y4PYhE+BjCP6NXbPxO1M1AoTBTVqJOjB2iPSFTyhWPQxBJiCmBIX+VpzyN+!NZTrdKm0wpp78n1I6at48m5DX7noN5FUSfwfc+L0o7CHlErn X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2964 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-01-09T01:57:56-06:00 List-Id: "Randy Brukardt" wrote: > "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. Agreed. I only had a vague recall of Georg's OP (had to google for it again). The whole thing horrified me so much I quickly closed the browser tab! But, to my eyes at least, mixing of conditional expressions inside a function expression is particularly ugly. -- -- Sent from my iPad