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,1042f393323e22da X-Google-Attributes: gid103376,public From: T Wheeley Subject: Re: Any research putting c above ada? Date: 1997/05/14 Message-ID: #1/1 X-Deja-AN: 241532014 Sender: tw104@york.ac.uk References: <334d3da5.14386594@aplcen.apl.jhu.edu> <2senchydgk.fsf@hpodid2.eurocontrol.fr> <5im3an$3dv@bcrkh13.bnr.ca> <33526cbf.41c6@cca.rockwell.com> <5iusvd$118e@newssvr01-int.news.prodigy.com> <33530e22.5940@worldnet.att.net> <5j18h3$1564@newssvr01-int.news.prodigy.com> <5j8ukr$lu9@nntpa.cb.lucent.com> <5jddr6$mqm@newssvr01-int.news.prodigy.com> <335d880c.324@dynamite.com.au> <5ki7ln$2ttg@newssvr01-int.news.prodigy.com> <336ea9ca.3c92@dynamite.com.au> <5kopik$1jos@newssvr01-int.news.prodigy.com> Organization: The University of York, UK Newsgroups: comp.lang.ada Date: 1997-05-14T00:00:00+00:00 List-Id: On 7 May 1997, Matthew Givens wrote: > Another thing about Ada that I deplore is generics. A nice concept, but > when the same procedure has eight different bodies, it's a bit confusing > to debug (which body had the bug in it???). Or optional parameters. Ugh, > I hate the concept. To me, no parameter to a procedure should ever be > optional. At any time. But I guess that's just the neanerthal C > programmer peeking out. (grin) I suppose I must be used to generics. The two things that continue to bug me in Ada though, happen to be a) String support Inbuilt strings are a nightmare to use, especially I/O. I eventually wrote my own package to read arbitrary length strings. The actual functions for manipulating strings are quite good, the absract Translate() procedure is quit nice, for example. Another problem with Ada strings is tyhat the language is continually encouraging you to copy them all over the place, which may be easy but it doesn't seem to be very efficient, imho, almost like BASIC. You have to delve into the depths of the language to control the memory allocation properly. b) WHY can't functions have out / in out parameters? All this means is that for example a Stack.Pop or Binary_Heap.delte-min subprogram has to be implemented as a procedure with an extra local variable, making things more difficult. It doesn't restrict the language particulalry, just annoys programmers. Of course you can get around it by making your stack variable a pointer (for example), and having the pop subprogram edit the information referenced by the pointer... Other than that it's not too bad; apart form being too big of course. :sb)