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-11 09:56:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Message-ID: <3EE75B94.9000207@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: C bug of the day References: <1054751321.434656@master.nyc.kbcfp.com> <20030611114948.00000bcc._elh_@_terma_._com_> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 11 Jun 2003 12:40:52 -0400 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1055349653 198.96.223.163 (Wed, 11 Jun 2003 12:40:53 EDT) NNTP-Posting-Date: Wed, 11 Jun 2003 12:40:53 EDT Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:38994 Date: 2003-06-11T12:40:52-04:00 List-Id: Erlo Haugen wrote: > On 11 Jun 2003 02:22:09 -0700 > kanze@gabi-soft.fr wrote: > ---Cut--- > >>I didn't say that there weren't better languages. I only said that >>there wasn't a perfect language. > > ---Cut--- > > 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.) 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. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg