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 Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!morpheus.pingos.org!news.albasani.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: why learn C? Date: Mon, 2 Apr 2007 18:37:18 -0500 Organization: Jacob's private Usenet server Message-ID: 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> <1175215906.645110.217810@e65g2000hsc.googlegroups.com> <1175230700.925143.28490@n59g2000hsh.googlegroups.com> <1btkgzzj6zimp.acsq8mkzqz1w$.dlg@40tude.net> <1175488143.324741.283480@y80g2000hsf.googlegroups.com> <1lxqyx4ognsed$.ait5qqwujfo8$.dlg@40tude.net> <1175501959.751535.23190@d57g2000hsg.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1175556946 640 69.95.181.76 (2 Apr 2007 23:35:46 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 2 Apr 2007 23:35:46 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news1.google.com comp.lang.ada:14750 Date: 2007-04-02T18:37:18-05:00 List-Id: "kevin cline" wrote in message news:1175501959.751535.23190@d57g2000hsg.googlegroups.com... > On Apr 2, 2:52 am, "Dmitry A. Kazakov" > wrote: > > > 1. Here you compare the language of templates (a quite crippled one) with > > the language in which the Ada compiler was written. > > Probably C or C++. The front-end of every Ada compiler that I know of (and know the implementation language) is written in Ada. Some of them use shared back-ends that are out of their control and are likely written in other things. My experience is that Ada is a great language for writing a compiler, because it has strong type checking that is hard to circumvent. The issues with type systems (like physical units) are irrelevant to compiler construction. I'm not quite sure why you're so concerned about generics/templates anyway. There is little reason to write a generic if all you want to do is create types in Ada: you just write an appropriate type declaration and package. (Maybe it is because C++ doesn't have a separate encapsulation mechanism, so you're pretty much stuck using classes for anything.) Yes, I agree that writing a good package for units is a pain (especially since the method you're suggesting won't work; it's probably best to just bite the bullet and write out every operation you need), but you only have to do it once per organization. (And the Amendment fixed the most important problem in Ada 95: the inability to "erase" an inappropriate operation from a unit type package.) Randy.