comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Lack of formal syntax undermines Ada
Date: Fri, 11 Apr 2008 11:13:16 -0700 (PDT)
Date: 2008-04-11T11:13:16-07:00	[thread overview]
Message-ID: <2147940c-0ae7-4043-8119-d55139d3efa2@b5g2000pri.googlegroups.com> (raw)
In-Reply-To: 47ff9f76$0$4848$9b4e6d93@newsspool4.arcor-online.net

On Apr 11, 10:27 am, Georg Bauhaus <rm.tsoh.plus-
bug.bauh...@maps.futureapps.de> wrote:
> use...@leapheap.co.uk wrote:
> > Ada is designed for the construction of high-integrity software
> > by validated compilers. Would it not be better to have formal
> > Ada lexical and syntactic rules, expressed in regular expression
> > and BNF format respectively, even if such rules turn out to be
> > not particularly readable?
>
> How will a syntax that is simple for the parser writer cause
> the language to be the best one for the programmer?
> In fact Ada was reportedly not designed to make the tool writers
> life easier.

Tell me about it!!

But on the other hand, I don't see parser generators as making life
easier for tool writers, either.  If you want to do something simple
like scan the source and extract a relatively small amount of
information about the source, they're fine.  For anything more complex
than that, I've found that working with tools like YACC can be a
pain.  It doesn't find the needed information in an order that's easy
to work with.


> Some of the ambiguity might in part have been caused by
> an original requirement,http://archive.adaic.com/docs/reports/steelman/steelman.htm#2
> but I can't tell.

The rumor I heard was that they wanted to ensure that programs could
be entered on certain ancient keypunch machines.  It's a bit ironic,
since a recent thread complained that Ada's handling of Unicode and
its 23,927,511,320,418 characters could be improved, and the original
language requirement wouldn't even let us use the whole ASCII
character set.  On the other hand, I suppose it's an advantage to keep
the character set limited, in order to prevent Ada programs from
starting to look like C or Perl or APL or Egyptian hieroglyphics
(sometimes all four look about the same to me).


> Actually, there have been arguments in favor
> of "overloaded parentheses" here because they permit switching
> between array access and function call without notice.

Only if you don't use array accesses on the left of an assignment, or
as an OUT or IN OUT parameter.  Actually, I think that's a pretty lame
after-the-fact rationalization, given that the original reason for
avoiding square brackets had nothing to do with any language design
principles.  If they had really meant that, they would have also used
the same syntax for record components, so that you could switch from
that to a function call without notice too---that would have been
useful.  (Ada 2005's Object.Operation notation gives us some of that,
22 years later.)  I'll allow that I've taken advantage of the
parenthesis overloading at times; although switching from array
accesses to function calls isn't a transparent change, it does save a
bit of editing work.

                                   -- Adam



  reply	other threads:[~2008-04-11 18:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11  9:41 Lack of formal syntax undermines Ada usenet
2008-04-11 11:20 ` Peter C. Chapin
2008-04-15 12:57   ` usenet
2008-04-16  2:26     ` Peter C. Chapin
2008-04-16  3:14       ` Eric Hughes
2008-04-17  6:37     ` Randy Brukardt
2008-04-11 17:27 ` Georg Bauhaus
2008-04-11 18:13   ` Adam Beneschan [this message]
2008-04-11 21:25 ` John McCabe
2008-04-11 21:45   ` Robert A Duff
2008-04-11 22:37     ` John McCabe
2008-04-11 23:08       ` Adam Beneschan
2008-04-12  7:16         ` Dirk Craeynest
2008-04-14  7:23         ` Jean-Pierre Rosen
2008-04-12 12:57       ` Robert A Duff
2008-04-12 15:06         ` (see below)
2008-04-12 16:25           ` John McCabe
2008-04-12 17:55             ` (see below)
2008-04-12 22:19               ` John McCabe
2008-04-13  1:13                 ` (see below)
2008-04-13 11:51                   ` John McCabe
2008-04-13 14:13                     ` (see below)
2008-04-13 19:34                       ` John McCabe
2008-04-13 20:51                         ` (see below)
2008-04-13 21:06                           ` John McCabe
2008-04-12 17:16         ` Gary Scott
2008-04-12 18:43           ` Peter C. Chapin
2008-04-12 19:16             ` Gary Scott
2008-04-12 20:04               ` Robert A Duff
2008-04-12 23:32                 ` Gary Scott
2008-04-13  1:16                   ` Robert A Duff
2008-04-12 20:02           ` Robert A Duff
2008-04-12 20:52             ` Pascal Obry
2008-04-13 22:01       ` Florian Weimer
2008-04-13  9:46 ` anon
2008-04-15 13:22   ` usenet
2008-04-15 16:08     ` Adam Beneschan
2008-04-13 22:04 ` Florian Weimer
replies disabled

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