comp.lang.ada
 help / color / mirror / Atom feed
From: rodemann@mathematik.uni-ulm.de (Joerg Rodemann)
Subject: Re: Ada vs. C++ (Readability)
Date: 1997/09/12
Date: 1997-09-12T00:00:00+00:00	[thread overview]
Message-ID: <3418fd44.0@news.uni-ulm.de> (raw)
In-Reply-To: 5v9nrm$8lp@panix.com


Hyman Rosen (hymie@panix.com) wrote:
> In article <dewar.873999270@merv>, Robert Dewar <dewar@merv.cs.nyu.edu>
>  wrote:
> >UGH! what a perfect illustration of the dangers of such capabilities.
> > Whenever
> >someone thinks they have done something clever, as in this case, they have
> >often created an unreadable, unmaintainable nasty!

> What exactly is it about 'ray x = 1, 2, 3;' that you find unreadable?
> The overloading lets you write vector and matrix initializations in a
> completely transparent fashion. The reason for the existence of
> operator overloading is exactly so that natural-looking notation does
> what it appears to do.

The problem we (or at least I) have with this is, that it is not a typical
statement in C++. It is not what a developper comfortable with C++ would
expect about this. If you want to design a new language then do so (as 
the Fortran people think about a simpler language called F(?) ). But think
about it: the training of new team member does contribute to the project's
costs as well. And sure, no one would expect e.g. Lisp code in Ada source.
It is one of the troubling things about macros and overloading: they may
lead to unexpected surprises. Say, there is an new library and you want to
keep your code as much as possible. Of course you have to change the type
names and...oops...suddely the comma has its usual meaning again. How
much time are you willing to search for such a bug? You see our concerns
are about the future of your programs: reusing, maintaining, extending.
Certainly this is something the numerics folks often do not care much about.
At least from my experiences.

> In any case, this is part of the interface of a library for high-speed
> computation, and is described clearly in that library's documentation
> and examples. I would expect that someone maintaining this code would
> first acquaint themselves with this, if they are to have any chance of
> success at all.

Hope the documentation is complete and up to date. :-) Especially if none
of the former experts is reachable any more.

Regards

Joerg

--
rodemann@mathematik.uni-ulm.de | Dipl.-Phys. Joerg S. Rodemann
Phone: ++49-(0)711-5090670     | Flurstrasse 21, D-70372 Stuttgart, Germany
-------------------------------+---------------------------------------------
rodemann@rus.uni-stuttgart.de  | University of Stuttgart, Computing Center
Phone: ++49-(0)711-685-5815    | Visualization Department, Office: 0.304
Fax:   ++49-(0)711-678-7626    | Allmandring 30a, D-70550 Stuttgart, Germany





  reply	other threads:[~1997-09-12  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-09  0:00 Ada vs. C++ (Readability) Joerg Rodemann
1997-09-09  0:00 ` Hyman Rosen
1997-09-10  0:00   ` Joerg Rodemann
1997-09-11  0:00     ` Hyman Rosen
1997-09-10  0:00   ` Simon Wright
1997-09-11  0:00     ` Robert Dewar
1997-09-11  0:00       ` Hyman Rosen
1997-09-12  0:00         ` Joerg Rodemann [this message]
1997-09-15  0:00         ` Richard A. O'Keefe
replies disabled

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