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-Thread: 103376,fc52c633190162e0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Brian May Newsgroups: comp.lang.ada Subject: Re: why learn C? References: <1172144043.746296.44680@m58g2000cwm.googlegroups.com> <1172161751.573558.24140@h3g2000cwc.googlegroups.com> <546qkhF1tr7dtU1@mid.individual.net> <5ZULh.48$YL5.40@newssvr29.news.prodigy.net> Date: Mon, 16 Apr 2007 12:09:48 +1000 Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.19 (linux) Cancel-Lock: sha1:jouNbxTr2FjYmW5F22oHKaQPpxo= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: snoopy.microcomaustralia.com.au X-Trace: quokka.wn.com.au 1176689345 202.173.153.89 (16 Apr 2007 10:09:05 +0800) X-Complaints-To: abuse@westnet.com.au Path: g2news1.google.com!news2.google.com!news.glorb.com!quokka.wn.com.au!not-for-mail Xref: g2news1.google.com comp.lang.ada:15050 Date: 2007-04-16T12:09:48+10:00 List-Id: >>>>> "adaworks" == adaworks writes: adaworks> Unlike the C family of languages, which are generally no adaworks> help at all, an Ada compiler frequently eliminates the adaworks> need for extensive debugging of silly errors; e.g., the adaworks> kind that originate from case-sensitivity, wrong order adaworks> of arguments to parameters, improper spacing, missing adaworks> curly-braces, and the plethora of language "features" adaworks> that plague those who have chosen to use any member of adaworks> the C family of languages. adaworks> It has always seemed rather odd to me that people who adaworks> are as intelligent as programmers, rarely question the adaworks> silliness of using tools such as C and C++ for serious adaworks> work. They simply take for granted that the kind of adaworks> errors that are so common in those languages are somehow adaworks> akin to the laws of nature. Java inherits many of those adaworks> same properties and is not much better. It is taken as adaworks> an article of faith that programming involves heavy use adaworks> of debuggers. Instead of asking why this is so, they adaworks> simply believe it is a fundamental law of programming -- adaworks> mainly because the languages they have chosen make it adaworks> so. I thought the following links were interesting. http://www.mega-nerd.com/erikd/Blog/CodeHacking/autoconf_ifdef.html http://sourcefrog.net/weblog/software/aesthetics/interface-levels.html "Rusty says the key criteria for an interface is how easy it is to use correctly or (by Murphy's Law) how hard it is to misuse. He delineates a spectrum from best to worst, which is so good I am going to shamelessly reproduce it here: 1. Compiler/linker won't let you get it wrong. 2. Compiler will warn if you get it wrong. 3. The simplest use is the correct one. 4. The name tells you how to use it. 5. Do it right or it will break at runtime. 6. Follow common convention and you'll get it right. 7. Read the documentation and you'll get it right. 8. Read the implementation and you'll get it right. 9. Read the correct mailing list thread and you'll get it right. 10. Read the documentation and you'll get it wrong. 11. Follow common convention and you'll get it wrong. 12. Do it right and it will break at runtime. 13. The name tells you how not to use it. 14. The obvious use is wrong. 15. Compiler will warn if you get it right. 16. Compiler won't let you get it right. 17. It's impossible to get right. " -- Brian May