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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,65cf1c5c90ed694 X-Google-Attributes: gid103376,public From: rodemann@mathematik.uni-ulm.de (Joerg Rodemann) Subject: Re: Ada vs. C++ (Readability) Date: 1997/09/12 Message-ID: <3418fd44.0@news.uni-ulm.de>#1/1 X-Deja-AN: 271809550 References: <341566c7.0@news.uni-ulm.de> <5v4kie$jp1@panix.com> <5v9nrm$8lp@panix.com> Organization: University of Ulm, SAI, Germany Newsgroups: comp.lang.ada Date: 1997-09-12T00:00:00+00:00 List-Id: Hyman Rosen (hymie@panix.com) wrote: > In article , Robert Dewar > 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