[chuck-users] include

Rasmus Kaj kaj at kth.se
Tue Nov 1 14:16:17 EST 2005

>>>>> "PD" == Philip Davidson <philipd at CS.Princeton.EDU> writes:

 PD> yes, but it's  in development / testing phases.

Ah, I should take a look at that, then ...   Is it a "simple lexical"
include (like with the c preprocessor), or is it in a higher level,
(what I'd like to call require/provide, like in elisp), so that the
included code only needs to be compiled once?

Basically, I'd like "require foo" to check (in a hash table) if foo
allready is provided, and in that case just return. If foo isn't
provided, it could search the load path for "foo.ck", and compile that
if found.

This would be very simple given a global namespace for functions and
classes (so that the classes in foo is available for all shreds when
foo is required in one).  Otherwise require would also have to include
the foo namespace into the current namespace.

Rasmus Kaj --+-- rasmus at kaj.se --+-- http://www.stacken.kth.se/~kaj/
Det är alldeles för mycket sport inom idrotten

More information about the chuck-users mailing list