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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79bbf7e359159d0d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-09 10:24:13 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!sjc-peer.news.verio.net!news.verio.net!sea-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: newbie can't get exceptions to work! In-Reply-To: Message-ID: References: <3ACDB29E.45B91316@earthlink.net> <9ao1if$cq9$1@taliesin.netcom.net.uk> <3ACFC902.115624A1@mindspring.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Mon, 09 Apr 2001 17:23:35 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 986837015 206.184.139.136 (Mon, 09 Apr 2001 17:23:35 GMT) NNTP-Posting-Date: Mon, 09 Apr 2001 17:23:35 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:6668 Date: 2001-04-09T17:23:35+00:00 List-Id: On Mon, 9 Apr 2001, Ted Dennison wrote: > In article , Brian > Rogoff says... > > > >On Sat, 7 Apr 2001, Larry Hazel wrote: > >> I personally think {} should be removed from the character set, or at least > >> require a minimum of 5 keystrokes to get either. > > > >Well, personally I think this opinion is crap. Any reasons behind your > > Whose, yours or Larrys? :-) Larry's of course. You mean OpenToken couldn't figure that out? What a useless library! :-) > >opinion? We were discussing making a language popular, and Bob Duff > >espoused the theory that C influenced syntax is popular, and that a new > >language might seek to emulate it. I don't find {} vs begin end to be > >terribly important, and not a reason that I like Ada over C and C++. > > There is absolutely no evidence that language popularity has anything > to do with syntax. Bob Duff apparently disagrees. While I don't entirely share his opinion, I have to admit that there is a fair bit of evidence in support of it. > That being the case, you'd like to strive for readability, not tersenes. False dichotomy. In many cases, terse notation is more readable. Besides, I imagine English keywords, rather than French, German, Chinese, or Hindi, were chosen for some reason. Assume that there are far more programmers (C, C++, Java, ....) who use a programming language with {} instead of begin-end nowadays, I think it's a fairly obvious argument which suggests that today {} is a readable choice based on the experience of readers. If you don't care at all about the readers expectations based on previous experience, an argument can be made for indentation based block structure as in Python and Haskell. I find that very readable. > Curly-braces look quite a bit like parens at first glance (and sometimes upon > further glances too, depending on the font). Being a single chararacter, they > are fairly easy to miss with the eye, and are harder for the eye to properly > line up with distant lines (thus perhaps cause misapprehension of the proper > nesting level). In fact, the impression of pointing in a certian direction > causes a mild optical illusion which worsens the problem. Being mostly vertical, > they can also get accidentally hidden behind the mouse pointer or an insertion > cursor. You're really reaching here! I've never had these problems, in many years of C, C++, and Java programming. I have had the problem of not being able to pick out arrays easily in the code of Ada since nothing really stands out in Ada. A good syntax should make different things look different. > >endlessly. Suffice to say that a slightly less verbose, more C like > >surface syntax for an Ada like language isn't a bad idea IMO. > If you want to favor the writer over the reader, perhaps. That's bullshit. This reader doesn't find Ada syntax all that great, nor C *syntax* that bad. Well, OK, modulo the declaration syntax. But I did say "copy Pascal" not C there. I suspect that most people who push this argument think that there is some objective criteria for readability which Ada optimizes. Please state it precisely. > That is not The Ada Way, though. I find Ada more readable than C++ because it has a lot fewer surprises in it's semantics. For instance, the combination of implicit coercion with overloading in C++ is a nightmare. Ada's modes express the programmer intent well, so I suggested keeping them. Syntax in C++ is gruesome, but in Java it isn't too bad. It's only bad because OO is largely a bunch of crap, not because of it's syntax. > >> And keep () for array indices. I have often used arrays as > >> approximations of complex functions in the early stages of development. > > > >I've never done that, and besides () makes code so much less readable. If > I have. Its damn handy. I don't find it unreadable at all. It takes "information > hiding" one step further. An array is really just a prebuilt mapping function. More BS. Arrays and strings are data, not functions. > >Anyways, this was a post-facto justification of this awful choice in Ada. > >To be fair, it wasn't really a choice (of Ichbiah and co.) but a > >requirement to the languages competing. > Are you sure? My understanding was that this was done *on purpose* for > just this reason. My recollection is that the last time this was discussed Robert Dewar confirmed the statement that there was no discussion of using [] as array brackets at all, the choice of () had to do with the DoD requirements on the character set to support (now) obsolete machines. All of this singing and dancing about the virtues of this choice are post facto rationalizations. -- Brian