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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news.addix.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!post.news-service.com!news1.surfino.com!not-for-mail Message-Id: <6043074.OqVQBAjyDP@linux1.krischik.com> From: Martin Krischik Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Reply-To: martin@krischik.com Date: Sun, 06 Mar 2005 10:40:44 +0100 References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110053977.478846@athnrd02> Organization: None User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@surfino.com NNTP-Posting-Host: 83.169.175.19 (83.169.175.19) NNTP-Posting-Date: Sun, 06 Mar 2005 11:00:09 +0100 X-Trace: 66a57422ad4a9f60c0ab620799 Xref: g2news1.google.com comp.lang.ada:8735 comp.lang.c++:44309 comp.realtime:1007 comp.software-eng:4538 Date: 2005-03-06T10:40:44+01:00 List-Id: Peter Koch Larsen wrote: > > "Larry Kilgallen" skrev i en meddelelse > news:Q5TNweyx8scS@eisner.encompasserve.org... >> In article <1110053977.478846@athnrd02>, Ioannis Vranos >> writes: >>> Mark Lorenzen wrote: >>> >>>> You can do everything in Ada that you can in C and C++. >>> >>> >>> I suppose you mean in the application-programming domain. But I do not >>> think this is true in the systems programming domain, that is efficiency >>> under *severe* run-time and space constraints. >> >> And what guesswork makes you think there would be efficiency problems >> with Ada ? >> >>> Also I am not sure if ADA is suitable for library writing, or you will >>> have to switch to another language to do that. >> >> Huh ? >> >> Again, what guesswork makes you suggest that ? >> >> It is even possible in Ada to make the calling convention be the >> unsafe C-style interface (null terminated strings, etc.). But for >> better safety in all the languages that might call the library, >> it is better to avoid those C conventions. > > It is also possible to use zero-terminated strings in C++, but every > knowledgeable person will advice that you use std::string. So what is the > difference here? The defaults (that is the i.E. the constant expression "Hello Word!"): Default in Ada are save strings - zero terminated via extenral library (Interfaces.C.Strings). Default in C++ is zero terminated, save strings via external library (std::string). Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com