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

Defun Private

I've uploaded a file to cambridge.apple.com /pub/mcl2/contrib/Defun-Private.hqx

This contains macros that define "private" or "static" functions
and macros.  Calling a private function from outside the source
file it is defined in, or before it is defined, will signal an
error. This can be useful since it enforces modularity.

It works by expanding into a defun on a created name, with a
macro to do the error check and generate the correct call.

There are defined ways to violate this modularity on a fine or coarse
grain (on a single call level, within a lexical context or for
a whole file) and calls made from a Listener can be made legal
or illegal.

Please send me any comments.  It is binhexed/compacted.  Hopefully
you will be able to FTP it OK.  This is the first time I've
put something into cambridge.apple.com.

Chris Eliot
University of Massachusetts at Amherst