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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-12 00:17:12 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Date: Thu, 12 Jun 2003 09:16:36 +0200 From: Erlo Haugen <_elh_@_terma_._com_> Newsgroups: comp.lang.ada Subject: Re: C bug of the day Message-ID: <20030612091636.000077e5._elh_@_terma_._com_> References: <1054751321.434656@master.nyc.kbcfp.com> <20030611114948.00000bcc._elh_@_terma_._com_> <3EE75B94.9000207@cogeco.ca> Organization: Terma A/S X-Newsreader: Sylpheed version 0.9.0claws (GTK+ 1.3.0; Win32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 62.242.55.242 X-Trace: 1055402231 dread11.news.tele.dk 5153 62.242.55.242 X-Complaints-To: abuse@post.tele.dk Xref: archiver1.google.com comp.lang.ada:39031 Date: 2003-06-12T09:16:36+02:00 List-Id: On Wed, 11 Jun 2003 12:40:52 -0400 "Warren W. Gay VE3WWG" wrote: > > > No language can be perfect, I guess. What is good for some kind of tasks > > might be bad in other cases. Ada has its strengths and weaknesses (think > > about string handling). I don't think anyone would even think about Ada for > > embedded applications in 8 bit MCU's as an example. > > > > Erlo > > I don't see string handling as being a "weakness". I know I sure > saw it that way when I was first starting to use the language. But > with the necessary experience, you learn the "Ada way" of working > with strings (this includes how to use native strings and when to > use Ada.Strings.Unbounded etc.) > I didn't mean weakness as in "unsafe". It's just that string handling in Ada is a little tediuos. Other languages has much better provision for string handling. This was just to show that for some jobs, other languages might be more productive. > If you want to be picky, C has "weaknesses" with strings too. For > example if you want to return a string value as a parameter, you > have to supply its maximum length as a separate argument (the > string pointer itself does not reflect how much room you have for > the result). There are other ways of returning strings through a > parameter, but none of them without their own caveats. > > Ada does require the programmer to think differently to use "native > strings". But this is not necessarily a "weakness" because it is > different. Correct. But the point I wanted to make was that a language that is perfect (or close to) for one task is not neccessary any good for another task. Erlo -- Remove the underscores