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=0.6 required=5.0 tests=BAYES_05,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!sunic!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.ada Subject: Re: problems/risks due to programming language Message-ID: <807@enea.se> Date: 24 Feb 90 19:52:51 GMT References: <5432@crdgw1.crd.ge.com> <8103@hubcap.clemson.edu> <10811@june.cs.washington.edu> <5017@csv.viccol.edu.au> Organization: Enea Data AB, Sweden List-Id: Dan L. Pierson (pierson@encore.com) writes: >*In fact, some of these "nifty" features present more opportunity for >misuse, and thus software engineering drawbacks, than benefits. >Operator overloading comes to mind... Of course you could do really ugly things with operator overloading, particulary in combination with RENAME. But in a good software engineering environment with code reviews you would never be allowed to do them. Operator overloading is an important feature. No wonder that both C++ and Eiffel has incorporated varities thereof. (Eiffel doesn't really have overloading, but well infix routines.) Why? Well, in my daily work, which is in Pascal, I have to struggle with quadword integers. An expression like a := a + (b*c) DIV d + e becomes when a, b and e are quads: a := Add_quads(a, Add_quads( Div_quads(Mult_quads(b, Conv_lw_to_qw(c)), Conv_lw_to_qw(d)), e)) which is not very readable. Even more important is that if have written the standard integer version above and later discover that I have to change to quads, I don't have to change any existing code. (Of course the example above can be alleviated in various ways. The routines used are the standard routines at the site I am on.) -- Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se