There are several ways to do that.
As Matthias, I often use a file called "base.rkt" where I put all the
constants that can be used in different files.
For non-constants, I use either a parameter or simply a getter procedure.
You can even place there some procedures to be defined later (kind of li
I tend to define such constants in a file dubbed 'basics' and require it
everywhere. See
https://github.com/mfelleisen/Acquire
for example. There 'basics' contains the constants I need for most of the game
implementation and some simple functions too.
-- Matthias
On Nov 3, 2013, at 1
Program P uses several functions (say, f and g) which can be implemented in
several different ways (think of (f,g) as a Java interface, with (f1,g1) as one
implementing class, (f2,g2) as another implementing class, etc.) I'd like to
be able to run the program with one implementation, then with
3 matches
Mail list logo