comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Ada extension information
Date: Thu, 28 May 2009 15:06:08 -0700 (PDT)
Date: 2009-05-28T15:06:08-07:00	[thread overview]
Message-ID: <c3a3a4ba-a604-4839-922a-a9c9aaab9d8f@d2g2000pra.googlegroups.com> (raw)
In-Reply-To: 4a1f0096$0$31331$9b4e6d93@newsspool4.arcor-online.net

On May 28, 2:22 pm, Georg Bauhaus <rm.tsoh.plus-
bug.bauh...@maps.futureapps.de> wrote:
> i...@midoan.com wrote:
> > More specifically where are these Ada extensions formally documented?
>
> This is AI 147, Conditional Expressions (as primaries).http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0147-1.txt?rev=1.2
>
> Yet another thing that makes Ada more attractive
> for programmers who would not waste valuable time
> for finding names, say write a small named function
> that conditionally returs this or that.
> Obviously, local functions are overly verbose
> and explicative, they must be avoided at all cost.
>
> Ada finally gets C's  ?:  conditionals!
> Have you ever seen anyone using ?: in C or Perl in
> a way that is obfuscating? Really?
>
> Nah, it's nice!  We can even leave out the bulky
> comb structure.  Just pairs of parentheses!
> the Lisp fans will rejoyce, C programmers will
> feel at home, done with a single stroke!
>
> loop
>    exit if (if N > 0 then M/N > 0 else M > 1);
>    N := F(M, N);
> end loop;
>
> Not even Lisp or ML style let bindings are necessary!
> Ah, fancy that! We've got more and more anonymous pointers,
> free and easy,  why not free floating control structure
> then?  I forget, it's a nice opportunity for tool vendors
> to sell more style enforcment programs and language restriction
> options.  They are learning ... :-)

Hey, it's not part of the Ada language yet, so no need to get all
worked up.  This feature could still be rejected.

And yes, this is certainly a feature that could be abused.  But as the
AI makes clear, there are cases where it can improve readability
because there's no other good way to accomplish the same thing.  Sure,
there are programmers who don't understand readability who would use
this construct in an inappropriate place, just because the feature is
there.  But those programmers probably wouldn't write readable code no
matter how many features you took away from them.  I've seen plenty of
incomprehensible Ada 83 code so I'm sure this is true.

                                       -- Adam



  parent reply	other threads:[~2009-05-28 22:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28 18:26 Ada extension information info
2009-05-28 18:30 ` Martin
2009-05-30  0:25   ` Randy Brukardt
2009-05-28 21:22 ` Georg Bauhaus
2009-05-28 21:31   ` Georg Bauhaus
2009-05-28 22:06   ` Adam Beneschan [this message]
2009-05-30  7:13 ` anon
2009-05-30 10:13   ` info
replies disabled

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