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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:908:: with SMTP id 8-v6mr7486685itm.36.1529446672471; Tue, 19 Jun 2018 15:17:52 -0700 (PDT) X-Received: by 2002:a9d:4c96:: with SMTP id m22-v6mr7329otf.6.1529446672380; Tue, 19 Jun 2018 15:17:52 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.68.MISMATCH!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!d7-v6no483243itj.0!news-out.google.com!c20-v6ni226itc.0!nntp.google.com!d7-v6no483237itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 19 Jun 2018 15:17:52 -0700 (PDT) In-Reply-To: <584564c2-9f64-4965-b045-535cdaf899c0@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5 References: <584564c2-9f64-4965-b045-535cdaf899c0@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Why are Ada compilers difficult to write ? From: Lucretia Injection-Date: Tue, 19 Jun 2018 22:17:52 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2874 X-Received-Body-CRC: 3825447053 Xref: reader02.eternal-september.org comp.lang.ada:53178 Date: 2018-06-19T15:17:52-07:00 List-Id: On Tuesday, 19 June 2018 22:33:38 UTC+1, Vincent wrote: > Dear Ada programers, >=20 > I have often heard that Ada compilers where expensive because they are ve= ry difficult to write, compared to Pascal or C ones. So my question is : wh= at in the Ada language poses problem to a compiler ? What are the challenge= s ? Where can I find documentation about that ? Here are the issues I see: 1) Getting the grammar from the AARM correct, because it's highly ambiguous= , doesn't include the pragmas (still!!!!) in the correct places and that it= includes semantic info, especially for ID's. 2) There are many many many rules that have to be observed *and* documented= for each implementation. 3) Overload resolution, as Jacob mentioned, it apparently a bitch. 4) It's a big language, including abstracted threaded via tasks, protected = objects, so it's not as simple as just writing a Pascal subset. Pascal as originally designed is tiny and can be implemented within a few d= ays to a week. TBH I think I could knock up a Pascal scanner and parser in = an afternoon, that's half of it done, stick it onto LLVM and it yer done. C is a massive bag of shit and would take ages to write a *decent* compiler= for, it has soooooooooooooooooooooooo many edge cases because it's such a = mess. Even though, all it is, is a simple list of declarations (variable, c= onstant, functions "prototypes"), function "bodies" and "types," but it's e= verything else that's the problem with C.