[racket] include vs require

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Mon Sep 3 15:20:20 EDT 2012

For my money, always use require, never use include.  A module that
you require is a separate unit of compilation, and its meaning is
fixed.  Every program that requires that module gets the same thing.
An include, on the other hand, just copy/pastes code into your
program.  The code thus becomes context-dependent.  Every program that
includes a file gets a separate copy, which depending on local
bindings may do/mean something completely different.

Carl Eastlund

On Mon, Sep 3, 2012 at 3:05 PM, prad <prad at towardsfreedom.com> wrote:
> i have a base program which is applied in different situations and so
> uses auxiliary scripts.
> i've turned these scripts into modules which are 'required' by the base
> program. it seems to me that i could have just as easily done an
> include.
> when should require vs include be used?
> --
> in friendship,
> prad

Posted on the users mailing list.