[CM] s7: warning if symbol is redefined and namespaces

bil at ccrma.Stanford.EDU bil at ccrma.Stanford.EDU
Wed Dec 7 04:25:48 PST 2016


load has a second argument, the environment to load into,
which defaults to the root environment, so

(let ()
   (load "file.scm" (curlet))

will place the top-level defines in file.scm into
the local environment.  Similarly eval has an
environment argument.


I think that s7 currently doesn't warn about shadowing or
redefining built-in names, though it does complain about
(set! if 3) and the like.  lint.scm is equally
lackadaisical.  I'll add optional checks in both places.

It's surprisingly common in current scheme practice
to use (say) 'list or 'string as a variable name --
I wonder if this is actually a common-lisp trope
that schemers are careless about?  It does lead to
errors.



More information about the Cmdist mailing list