3 ms·
One of the interesting features of Oberon the language is that its syntax allows for very fast compilation times, to the point that on today's hardware there is
by Koshkin 10y ago
One of the interesting features of Oberon the language is that its syntax allows for very fast compilation times, to the point that on today's hardware there is little need in storing library modules' code in the form of binary objects. For example, building the Oberon compiler from its sources and the sources of the Oberon standard library (all written in Oberon) only takes a fraction of a second.
- pjmlp 10y agoThat is actually common to all Mesa descendants, not only Oberon.
- nine_k 10y agoAFAICT it was one of design goals, considering the hardware. I remember how a Pascal compileron a PDP-11 would tell me "15 KB used" upon compilation. It seemed to only keep the relevant part of symbol table,plus a small work area, in RAM. Everything else went straight to disk as machine code.
- vidarh 10y agoThe common workaround for this kind of thing for other languages was to either write to disk in between multiple passes and/or load code for one pass at a time. We still have multiple passes in many compiler toolchains in the form of compiler->assembler->linker, but there were older compilers with ridiculous numbers of passes out of sheer necessity. E.g. here is a HN discussion about a 63 pass compiler for the IBM 1401 [1] (There's been a resurgence in interest in multiple passes in the form of "nanopass" architectures, but today that's driven out of a desire to simplify code, whereas before it used to be out of a need to minimize memory use or even fit the code needed in memory) But, yes, this is one of the drivers in a lot of older languages, but particularly the Wirth-ian ones, for declarations before use, etc. so that the language can be easily parsed and compiled in a single pass. The Wirth compilers typically didn't build an AST either. [1] https://news.ycombinator.com/item?id=9289070 https://news.ycombinator.com/item?id=9289070