comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: newbie can't get exceptions to work!
Date: Mon, 09 Apr 2001 21:44:24 GMT
Date: 2001-04-09T21:44:24+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0104091353580.6359-100000@shell5.ba.best.com> (raw)
In-Reply-To: <afpA6.1150$FY5.85107@www.newsranger.com>

On Mon, 9 Apr 2001, Ted Dennison wrote:

> In article <Pine.BSF.4.21.0104090948440.6359-100000@shell5.ba.best.com>, Brian
> Rogoff says...
> >
> >On Mon, 9 Apr 2001, Ted Dennison wrote:
> >False dichotomy. In many cases, terse notation is more readable. 
> 
> I didn't say there was a dichotomy, just that terse notation is not the goal,
> and thus can't be put forth as a good unto itself, when weighed against other
> factors.

When did I do that? Try reading what I wrote, not making up interpretations 
of your own. If two notations are equally readable, but one is terser
than the other, I assume you chose the more verbose one? 

> >Besides, I imagine English keywords, rather than French, German, Chinese,
> >or Hindi, were chosen for some reason. Assume that there are far more
> 
> I'd say that if the Hindi words for "begin" and "end" were used, it would still
> be a better choice than using a single, practicly 1-dimensional character.

I'll be sure not to use a language you design in the future!

> >> 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.
> 
> >I've never had these problems, in many years of C, C++, and Java
> >programming. 
> 
> I've had every single one of them.

What can I say. Some people learn one language and like it so much that they 
are unable to get past superficial syntactic issues in other languages. 
I've never been much of a syntax fanatic, though I do have preferences. 
Lisp, Forth, Haskell, and others never really caused me pain syntax-wise, 
though I admit getting used to their semantics took a fair bit of work. 
C and Ada are practically the same to me from a syntax point of view. I
suspect you're just used to very few languages. 

> The problems lining begin-end blocks up is
> particularly nasty when trying to understand someone else's code heavily
> indented code, especially those who use less than 3 spaces for indentation.

Poorly indented code in any language doesn't read well, and that includes
Ada.  And 2 spaces works just fine, thanks, though I indent 4 when I have
the choice. 

> >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. 
> 
> Why do you *need* to pick out arrays?

Because I am a programmer. Reading code is just one of those things that I
do from time to time. Given that arrays and functions are different,
programmers who read other people's code need to know what's what when
reading. 

> I'd say that a good syntax should *not* point out differences that are of no
> consequence to the user. 

Can you treat an functions and arrays the same way? Or is there something
about arrays and strings that suggests that they are different? 

> These are all quite different things underneath the scenes, but as long as they
> return a value of the correct type the user doesn't really care about that.
> That's good for me as a reader, because that hides detail that I don't really
> care about in trying to figure out the code in which it appears. If I start to
> worry about how MyObject.Field gets its value, *then* I'll go track down its
> definition. I take it you don't like this either?

You take it wrong. However, I wouldn't mind if a different symbol were
used for method invocation in C++, since it really isn't the same thing 
as accessing a field. Also, I much prefer Ada's unification of . and -> 
syntax, since I really don't care in this case. As far as package and
record access, they're pretty close. In a language with first class
modules, records and modules would in fact be the same thing. Cayenne is 
that kind of language. 

> >More BS. Arrays and strings are data, not functions. 
> 
> Ahhh, now we are getting into software metaphisics. At a low level, its all just
> bits.

Thanks for the lesson. This is really deep stuff. You must be really
smart. 

Don't like sarcasm? Don't talk down to your interlocutors.

You typically use arrays as containers. You get slices. You do lots of
things that you don't do with functions. And vice versa. rather than 
pretend that they are the same, I say just accept reality and give them a 
diferent syntax. Of course, Ichbiah didn't have that choice. there was no
discussion, so he had to do what he did. Sure, you can find some advantages 
for this, but it looks like a flaw to me!

> At an equally silly high-level, we've got this "black box" program. Somewhere in
> the middle, we have concepts like "arrays" and "functions". As our high-level
> language source code representation is somewhere in the middle, there is going
> to be a certain amount of abstraction. It sounds like you just like a smidge
> less abstraction in your source code than I do.

Sounds like you'd prefer a language where strings, arrays, and functions
all had exactly the same restrictions, or were possibly even just
implemented exactly the same way. Perhaps the untyped lambda calculus is 
what you'd like to program in. As a matter of taste, that's fair enough. 
Etc., etc...

> >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
> 
> That does seem to sound a bit familiar. Still, every now and then the bread
> lands jelly-side-up. :-)

But, given that two of the Reviewer Roberts seem to prefer [] (just need 
Robert Eachus for the hat trick :) over () I think it looks more like 
a mistake, or at least a suboptimal choice. Anyone know what Jean Ichbiah's 
take on this is, as in would he have done this if he didn't have to? Pretty 
clearly Niklaus Wirth favors [] ...

-- Brian





  reply	other threads:[~2001-04-09 21:44 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-05  3:19 newbie can't get exceptions to work! Jeff Shipman
2001-04-05  4:25 ` Ed Falis
2001-04-05 11:00   ` martin.m.dowie
2001-04-05 14:21     ` Ted Dennison
2001-04-05 17:50       ` Fraser Wilson
2001-04-05  4:34 ` Jeff Shipman
2001-04-05  4:59 ` Wilhelm Spickermann
2001-04-05 14:14   ` Ted Dennison
2001-04-05 16:37     ` Wilhelm Spickermann
2001-04-06 13:09     ` Marc A. Criley
2001-04-06 15:04       ` Ted Dennison
2001-04-06 16:43       ` Robert A Duff
2001-04-06 17:39         ` Ted Dennison
2001-04-06 21:50           ` Robert A Duff
2001-04-06 20:11         ` Brian Rogoff
2001-04-06 22:20           ` Robert A Duff
2001-04-06 23:04             ` Brian Rogoff
2001-04-07  5:48               ` Jeffrey Carter
2001-04-10  1:29                 ` Robert A Duff
2001-04-07 19:30               ` Robert A Duff
2001-04-07 21:17                 ` Brian Rogoff
2001-04-07 21:25                   ` Ayende Rahien
2001-04-07 22:57                     ` David Starner
2001-04-08 12:10                       ` Ayende Rahien
2001-04-08  2:12                     ` Larry Hazel
2001-04-08 12:12                       ` Ayende Rahien
2001-04-09 16:20                         ` Larry Hazel
2001-04-10  2:38                           ` Ayende Rahien
2001-04-10  3:25                             ` James Rogers
2001-04-08 22:18                       ` Brian Rogoff
2001-04-09 15:14                         ` Ted Dennison
2001-04-09 17:23                           ` Brian Rogoff
2001-04-09 18:23                             ` Laurent Guerby
2001-04-09 19:15                               ` Brian Rogoff
2001-04-10 18:21                                 ` Laurent Guerby
2001-04-10 19:44                                   ` Brian Rogoff
2001-04-11 18:03                                     ` Laurent Guerby
2001-04-11 18:33                                       ` Samuel T. Harris
2001-04-14  0:06                                         ` Robert A Duff
2001-04-12  1:42                                       ` Mike Silva
2001-04-12  2:38                                       ` Brian Rogoff
2001-04-12 23:23                                         ` Laurent Guerby
2001-04-13  2:44                                           ` Brian Rogoff
2001-04-11 13:24                                   ` Ayende Rahien
2001-04-11 13:14                                     ` Mats Karlssohn
2001-04-11 15:08                                       ` Ayende Rahien
2001-04-11 21:42                                       ` Fraser Wilson
2001-04-12 23:55                                         ` Robert A Duff
2001-04-10  2:12                               ` Robert A Duff
2001-04-10  3:47                                 ` Brian Rogoff
2001-04-10 13:40                                 ` Ada keywords (was: Re: newbie can't get exceptions to work!) Marin David Condic
2001-04-10 14:26                                   ` Jean-Pierre Rosen
2001-04-09 20:49                             ` newbie can't get exceptions to work! Ted Dennison
2001-04-09 21:44                               ` Brian Rogoff [this message]
2001-04-09 21:59                                 ` Ted Dennison
2001-04-10  2:54                                   ` Ayende Rahien
2001-04-10 14:00                                     ` Ted Dennison
2001-04-10 17:44                                     ` Fraser Wilson
2001-04-10  6:59                               ` Mats Karlssohn
2001-04-10 14:18                                 ` Ted Dennison
2001-04-10 16:27                                   ` Mark Biggar
2001-04-11 11:55                                     ` Mats Karlssohn
2001-04-11 14:34                                       ` Samuel T. Harris
2001-04-11 15:50                                         ` Pat Rogers
2001-04-12  6:27                                         ` Mats Karlssohn
2001-04-11 11:49                                   ` Mats Karlssohn
2001-04-11 15:38                                     ` Robert A Duff
2001-04-13 16:12                             ` Matthew Woodcraft
2001-04-10  1:41                   ` Robert A Duff
2001-04-10  3:03                     ` James Rogers
2001-04-10  3:58                       ` Brian Rogoff
2001-04-10 21:48                         ` Ted Dennison
2001-04-11 15:09                           ` Ayende Rahien
2001-04-11 21:57                             ` James Rogers
2001-04-11 23:13                               ` Brian Rogoff
2001-04-12  6:33                                 ` Mats Karlssohn
2001-04-12 16:38                                   ` Brian Rogoff
2001-04-17  7:04                                     ` Mats Karlssohn
2001-04-17  9:08                                       ` Jean-Pierre Rosen
2001-04-12 15:16                               ` Ted Dennison
2001-04-12 21:22                                 ` James Rogers
2001-04-10  4:26                     ` Brian Rogoff
2001-04-11 15:30                       ` Robert A Duff
2001-04-11 17:33                         ` Brian Rogoff
2001-04-10  1:26               ` Robert A Duff
2001-04-10  2:11                 ` Brian Rogoff
2001-04-14  0:00                   ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
2001-04-05  5:26 Christoph Grein
replies disabled

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