[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LOCALES



I would like to suggest an alternative to locales as a method of
dividing up the name space. You will notice that it is based on
Ada packages. My experience with T locales and Zeta Lisp packages
is that people tend to have a few large locales, and access to internal
symbols of the locale is uncontrolled. I would like to see a locale
system that encourages many locales with limited access to the symbols
within. Instead of inventing anything very new, I suggest the following
syntax:

(define-module <name>
               (<with module names>) ; modules accessible - like REQUIRE.
	       (<use module names>)  ; visible symbols - like HERALD.
               (<exported symbols>)  ; All other local symbols MAY be
				     ; removed by the compiler. Its as if
				     ; local symbols were defined 
				     ; by LABELS for the optimizing
				     ; compiler, and DEFINE for the 
				     ; STANDARD-COMPILER.
     <body>)	
where "like REQUIRE" really means "sort of like REQUIRE" and when the
exported symbol list is t, that means export all symbols. This is suggested
for use by those who do not believe in limiting access to the module's
internals.

The advantages of such a system include decoupling the size of a compilation
unit from the size of a file and allowing the optimizing compiler to generate
smaller binary files as well as increasing the ease of understanding a program.
I notice that kernel language of the Japanese fifth
generation computers has adopted such a module system (Takashi Chikayama, 
"ESP - Extended Self-contained PROLOG - as a Preliminary Kernel Language of
Fifth Generation Computers" in New Generation Computing, Vol 1, p. 11, 1983).
Explicit control over naming seems to me to be in the spirit of T.