comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Dowie <martin@re.mo.ve.thedowies.com>
Subject: Re: Ada2012 : Expression functions and extended return statements
Date: Mon, 09 Jan 2012 01:57:56 -0600
Date: 2012-01-09T01:57:56-06:00	[thread overview]
Message-ID: <1444231023347788223.596944martin-re.mo.ve.thedowies.com@news.btinternet.com> (raw)
In-Reply-To: jee11f$hs8$1@munin.nbi.dk

"Randy Brukardt" <randy@rrsoftware.com> wrote:
> "Martin" <martin@thedowies.com> wrote in message 
> news:50ec6d9a-5062-477f-826f-239fd2712a09@f11g2000yql.googlegroups.com...
> On Jan 7, 1:50 am, "Randy Brukardt" <ra...@rrsoftware.com> 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



  reply	other threads:[~2012-01-09  7:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06  8:45 Ada2012 : Expression functions and extended return statements Martin
2012-01-06  9:45 ` stefan-lucks
2012-01-06 10:02   ` Martin
2012-01-06 11:23     ` Peter C. Chapin
2012-01-06 11:37       ` Martin
2012-01-06 13:13         ` Dmitry A. Kazakov
2012-01-06 14:45           ` Martin Dowie
2012-01-06 15:07             ` Martin
2012-01-06 16:40             ` Robert A Duff
2012-01-06 17:04               ` Martin Dowie
2012-01-19  7:47               ` David Thompson
2012-01-06 17:20             ` Dmitry A. Kazakov
2012-01-07  1:47               ` Randy Brukardt
2012-01-07  9:21                 ` Dmitry A. Kazakov
2012-01-06 16:45           ` Adam Beneschan
2012-01-06 16:36     ` Adam Beneschan
2012-01-07 14:54     ` stefan-lucks
2012-01-07 15:11       ` Dmitry A. Kazakov
2012-01-08  9:41         ` stefan-lucks
2012-01-09  6:16         ` Randy Brukardt
2012-01-06 15:11   ` J-P. Rosen
2012-01-06 15:26     ` Martin
2012-01-07  1:50       ` Randy Brukardt
2012-01-07 10:12         ` Martin
2012-01-07 12:22           ` Simon Wright
2012-01-07 17:10             ` Martin
2012-01-09  6:21           ` Randy Brukardt
2012-01-09  7:57             ` Martin Dowie [this message]
2012-01-31 23:34             ` Yannick Duchêne (Hibou57)
2012-01-06 16:33 ` Adam Beneschan
2012-01-06 16:38   ` Adam Beneschan
2012-01-06 22:12     ` Robert A Duff
2012-01-31 23:20 ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox