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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f822ae7b0f7433c1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!a75g2000cwd.googlegroups.com!not-for-mail From: "Talulah" Newsgroups: comp.lang.ada Subject: Re: Translating an embedded C algorithm Date: 18 Jan 2007 06:19:26 -0800 Organization: http://groups.google.com Message-ID: <1169129966.683025.63680@a75g2000cwd.googlegroups.com> References: <1168871816.263502.212100@11g2000cwr.googlegroups.com> <45ae0afb$0$22524$39db0f71@news.song.fi> <1169040688.133180.20300@s34g2000cwa.googlegroups.com> NNTP-Posting-Host: 212.248.198.150 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1169129979 20749 127.0.0.1 (18 Jan 2007 14:19:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 18 Jan 2007 14:19:39 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 ukman005.uk.landisgyr.com:3128 (squid/2.5.STABLE10) Complaints-To: groups-abuse@google.com Injection-Info: a75g2000cwd.googlegroups.com; posting-host=212.248.198.150; posting-account=z8Bf2AwAAACTha-0EcZ9lFjw3-dKgDhx Xref: g2news2.google.com comp.lang.ada:8259 Date: 2007-01-18T06:19:26-08:00 List-Id: Jeffrey Carter wrote: > Where the example came from should be irrelevant for a small example in > a text. It is irrelevant for the book, but not for the choice of language. >Apparently you have a monopoly, since your share of the market > in your calculations is the total market. Our estimate is for 20% of this market. The same argument applies to the resulting =A3100,000 profit as it would to a =A3500,000 profit. If we did have a monopoly, price would not be an issue of course! > Where we have hard data, they show that Ada reduces development costs by > 1/2 over C, reduces post-deployment errors by 1/4, and reduces the cost > to fix an error by 1/10. I accept that may be the case. However, there are no Ada tools for very many microcontrollers. The cost drives the choice of microcontroller, and the microcontroller then drives the choice of development system. > There is a least one documented case of Ada producing smaller code than > hand-optimized assembler. I love these statistics. There's a Java vendor who reckons the byte code runs faster than C as well. You can prove anything if y0ou have choice over the tools that you use to produce the results. This "hand coded assembler" could mean anything - it could mean taking Ada compiled code and ADDING instructions to it! Thinking logically, if the assembler coder was any good, he can always produce code of equal size to compiled code, and should always produce tighter code. It just depends what he is trying to prove, and who has sponsored him to do the work! > Dewar has a number of examples of equivalent > Ada and C code that produce identical object code. > Thus, the assumption that C is necessary to keep costs down is > unsupported, a fact that anyone qualified to choose the language for > such SW should know. When was the last time you wrote an Ada program to run on a microcontroller such as a PIC or ATMega48, i.e. something around the $0.50 price mark? And can you tell me a compiler vendor? C compilers are available for both these devices. Therefore most embedded developers (who are not in the military market and where cost is the greatest issue) cannot choose the language they develop in. > Finally, I did not assert that you are unqualified to write such a book. > I said, "I have to wonder about the qualifications of someone who only > knows C." I am perfectly willing to have it demonstrated that you are > qualified. Nit-picking. Fine distinctions. As I said before, most embedded development IS doen in C, so that should be reflected in the book. The fact that I want to show readers that other languages exist, and are better for certain applications does not mean that I have to be an expert in, or even know those other languages, especially when there are so many very helpful posters to this thread that have made useful suggestions.