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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Fri, 11 May 2018 14:26:33 +0300 Organization: Tidorum Ltd Message-ID: References: <87h8no1nli.fsf@nightsong.com> <874ljo1hvy.fsf@nightsong.com> <87vac4z2lh.fsf@nightsong.com> <87lgcszjdn.fsf@nightsong.com> <87sh6z1kkg.fsf@nightsong.com> <87k1sb1dt3.fsf@nightsong.com> <87d0y3ys2g.fsf@nightsong.com> <87y3gq36eq.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net wUs/fpajzZsEREu6MeINewP+4PAbs+8ZMM6NZzRQ/yBOBeYtAM Cancel-Lock: sha1:WuxsAyOeF90YuuApLBjinqQ1g04= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <87y3gq36eq.fsf@nightsong.com> Xref: reader02.eternal-september.org comp.lang.ada:52263 Date: 2018-05-11T14:26:33+03:00 List-Id: On 18-05-11 12:09 , Paul Rubin wrote: > Niklas Holsti writes: >> Ada has always allowed separate compilation. In the early days of Ada >> 83 compilation could be so slow that rebuilding a whole, large program >> could take a week. Separate compilation was essential. Some Ada >> environments (Rational) almost insisted on separate compilation of >> each subprogram, let alone each package. > > A week?! Ouch! Was that the NYU compiler written in SETL? I only heard about such cases, never experienced them personally (I started using Ada with the DEC VAX Ada compiler, a very decent one, and my programs were not that large). AIUI the week-long builds were with production Ada compilers, not the SETL-based compiler. But the programs involved were quite large, perhaps even by today's standards. But those were the days when compilation speeds were expressed in Lines Per Minute, whatever the source language. > What I don't understand is, why didn't the same issue apply to Pascal? > Didn't it also need whole-program typechecking? The original "teaching" Pascal had no module system and no separate compilation so there was no problem. Later, "production" Pascal programming systems invented their own module systems and separate compilation systems, one example being Turbo Pascal. Even later, modules were standardised in the new Pascal standards. I don't know how eg. the GNU Pascal compiler implements whole-program checks; perhaps in the same way as GNAT. >> the withed declarations are (re-)compiled on the fly when the withing >> unit is compiled. The penalty for such recompilation is smaller today, >> with faster machines and compilers. > > It's just the .ads that's included, right? Usually, but of course it has to be done recursively when the "withed" declaration has its own "with" clauses. In the case of generic instantiation and in-lining, the "withed" body (.adb) may be needed too. > Was the speed that bad an issue even on the old machines? I don't know if the first Ada implementors ever did any comparative measurements before choosing the traditional Ada library approach. The essay you referenced, by David Wheeler, explains how the GNAT team hand-optimised the GNAT front-end to support the current source-based approach; perhaps the same could have been done back then. > Is Ada really harder to compile than Pascal? Well, which Pascal do you mean? There is no question that Ada 83 was much larger in scope and harder to compile (into efficient code) than the original Pascal. I think that is still true for Ada 2012 and current Pascal, but I don't know enough about the latter to understand the magnitude of the difference. > I've always liked this article even though I never used Turbo > Pascal: http://prog21.dadgum.com/116.html That makes a point about the smallness of the Turbo Pascal compiler. AIUI the compiler was written in assembly language by a very skilled programmer, and was aimed at fast compilation rather than fast code (any machine code was blazing fast compared to Basic...). Perhaps Randy could quote some comparative size numbers for the early versions of Janus/Ada? Though I understand that Janus/Ada required HW memory extenders for the early PCs, just as the early Alsys compilers did (according to the Wheeler essay; again I have no personal experience). -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .