[HN Gopher] Ask HN: Is it just an accident that Pascal can be co...
___________________________________________________________________
Ask HN: Is it just an accident that Pascal can be compiled
extremely fast?
Or was Pascal designed in a way to make this possible?
Author : amichail
Score : 8 points
Date : 2023-01-23 20:40 UTC (2 hours ago)
| 082349872349872 wrote:
| Designed: industrial programs might be compiled once and run
| multiple times. Student programs, on the other hand, will likely
| be run fewer times than they are ever (attempted to be) compiled.
|
| Pascal's original use was the latter case.
| Someone wrote:
| I don't think that's completely true. Pascal was also designed
| as a general purpose language to compete with Algol and
| Fortran.
|
| See for example Wirth's https://www.research-
| collection.ethz.ch/bitstream/handle/20....:
|
| _"Compared to Algol 60, its range of applicability is
| considerably increased due to a variety of data structuring
| facilities. In view of its intended usage both as a convenient
| basis to teach programming and as an efficient tool to write
| large programs..."_
| AnimalMuppet wrote:
| My first reaction was that Pascal's extremely spartan I/O
| capabilities made that a pipe dream. But then I remembered
| what Fortran's I/O was like...
| bob1029 wrote:
| Turbo pascal was definitely designed on purpose to make things as
| fast as possible and undercut all the competition. The compiler
| for this was ultimately developed by the same guy who architected
| C#.
| musicale wrote:
| As a follow on question: how did fast/responsive (for their
| time) vintage IDEs like Turbo Pascal and Think C speed up the
| _linking_ phase?
| amichail wrote:
| Turbo Pascal didn't invent Pascal though.
| jacobgorm wrote:
| In a previous life, I used to do some fairly heavy drinking
| with Preben Madsen, who co-founded and was the CEO of PolyData,
| the Danish company where Anders Heglsberg developed PolyPascal
| that Borland OEM'ed as Turbo Pascal. According to himself,
| Preben was the one who convinced Anders Heglsberg to dump Algol
| for Pascal.
|
| They were doing really well with the royalties from Borland,
| and the highlight of Preben's story is when he went to a
| Porsche dealer to trade his BMW for a 928 (as I recall). The
| dealer would not offer him a good enough trade-in price for the
| BMW, until Preben suggested that he would just buy two Porsches
| instead of one. I am sure today's crypto-bros can tell even
| more impressive stories, but for mid-80s Denmark that one was
| actually quite above average.
|
| Unfortunately, the money that PolyData made on Turbo Pascal was
| all wasted trying to enter the ERP business with a system named
| Albatross that even IBM viewed as a serious competitor to their
| IBM Navigator system at one point. However, at years' end
| reporting, a bug in Albatross would cause all the financial
| records to get chewed up, which made the system very hard to
| sell after that. The Albatross disaster caused PolyData to
| eventually go under, and Heglsberg left PolyData to go work for
| Borland in the US.
|
| After PolyData, Preben started a small PC games distribution
| company called PolyMedia, and, as I was a (very young man) in
| the games business in the mid 90s myself, I would always bump
| into him in London at the bi-annual ECTS computer trade show,
| where we would go out for dinner and get very drunk, and he
| would share his many stories of past fame & fortune.
| Someone wrote:
| The latter. http://pascal.hansotten.com/niklaus-
| wirth/recollections-abou...
|
| _"Sophistication in syntax analysis was very much in style in
| the 1960s, allegedly because of the power and flexibility
| required to process high-level languages. It occurred to me then
| that a much simpler and more perspicuous method could well be
| used, if the syntax of a language was chosen with the process of
| its analysis in mind. The second attempt at building a compiler
| therefore began with its formulation in the source language
| itself, which by that time had evolved into what was published as
| Pascal in 1970 [Wirth, 1970], The compiler was to be a single-
| pass system based on the proven top-down, recursive-descent
| principle for syntax analysis."_
| AnimalMuppet wrote:
| Pascal - the original Pascal, since in a comment you seem to
| dislike Turbo Pascal - was designed for a one-pass compiler.
| Things were laid out to make things very easy for that one-pass
| compiler - everything defined before its use, no back-tracking
| necessary. Also the grammar was very simple. And the compiler
| attempted very few (if any) optimizations compared to current
| compilers.
|
| In short, the language design meant that the compiler didn't have
| to do much, so what it did, it could do quickly.
| throwaway81523 wrote:
| No, not an accident. This article is about Turbo Pascal but
| discusses some of the topic: https://prog21.dadgum.com/47.html
___________________________________________________________________
(page generated 2023-01-23 23:02 UTC)