Question about declare-top



--- Richard Fateman  wrote:
>
> I think the idea is this:
> 
> If you have programs that are defined within a file F and you use,
> as global variables   x, y, z,   you might declare them to be
> "special". But you probably don't want them to be special in other
> files that are compiled after F.

But then by definition they aren't global, correct? (at least in the
sense that we don't want all of MAXIMA to know about them.)  And if I
understand how this works in common lisp they ARE special in files
compiled after F, since unspecial doesn't work.  I don't understand why
you would want to work this way - can you provide an example where this
behavior is desirable, or rather what it achieves?  I would have
thought packages make more sense for this sort of thing, but that
probably just means I still don't know what special accomplishes.

> No, it has to do with binding. Special bindings are not lexical, but
> dynamic.

OK.  I have a feeling I'm stumbling on one of the things I never really
have grasped properly about Comp Sci.  This is how I've view these
things:

lexical -> local variable, defined only within the relevant section of
code.  definitions do not propagate
dynamic -> globally accessable, and globally reassignable?

So special -> unspecial would be an attempt to temporarily make
something globally accessable (during, say a file compile) but then
revoke that global status after the job is done?  Wouldn't something
like that be better handled with packages?

CY (who apologizes for bothering everybody with such basic stuff)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com