if the else short form

Neville Dempsey nevillednz at gmail.com
Mon Oct 11 09:58:07 EDT 2010


On Oct 11, 11:46 am, Lawrence D'Oliveiro <l... at geek-
central.gen.new_zealand> wrote:
> Nowadays we take it for granted that the core language should be a strong
> and compact basis to build on, rather than providing lots of built-in
> features, and all the rest should come from run-time libraries.

Fast forward to 1972...
In 1972 British Military implemented USE, KEEP and HERE for ALGOL 68RS

and then in 1978...

Check out NEST and EGG in "Formal Definition of Modules and Separate
Compilation".
http://www.google.com.au/search?q=%22A-Modules-and-Separate-Compilation-facility-for-ALGOL-68%22

9.4.1.d
   module symbol{49a}                       MODULE
   access symbol{36b}                       ACCESS
   def symbol{49c}                          DEF
   fed symbol{49c}                          FED
   public symbol{36d,41e}                   PUB
   postlude symbol{49f}                     POSTLUDE
{{Moreover, two more new symbols are yet to be invented for use in
separate compilation:}}
   formal nest symbol{56b}                  NEST
   egg symbol{A6a,c}                        EGG

These were defined to avoid things like C's problem with "#include"
For example a typical 5 line program can require the compilation of a
163kb file, 5 linesor original source becomes almost 5 thousand lines
of pre-processed source e.g.:

$ cat hello_world.c
#include <stdlib.h>
#include <stdio.h>
int main(int c, char *argv, char *argp){
  printf("Hello, world!\n");
}
$ gcc -C -E hello_world.c -o hello_world.txt
$ wc hello_world.txt
  4554  24360 163915 hello_world.txt

The idea would be to compile the text file one and generate one
compiled file contains the required symbols... bingo, there you have
it.  Compilations are potentially 1000x faster?  Hence the NEST and
EGG idea.

The Soviet GOST standard details the standardisation of NEST and EGG
(Page 271):
http://vak.ru/lib/exe/fetch.php/book/gost/pdf/gost-27975-88.pdf
(altogether there are also: MODULE, ACCESS, DEF, FED, PUB, POSTLUDE,
NEST & EGG)

(BTW: The Soviet standard also details the use of ON, EXCEPTION and
RAISE, on page 269)



More information about the Python-list mailing list