开发者

How to unload a lisp file in CLisp REPL?

Am able to load and call the functions but I would like to reload the file after making some corrections.

Cant find either an u开发者_如何学Pythonnload or reload function?


Unloading is not really possible. It is for example possible to delete a package and thus remove its definitions. But other references to a symbol of that package might still exist.

The typical way to deal with that is to load a file again, as Vijay Mathew mentioned.

It might be helpful that the file loaded is written in such a way that reloading is possible.

A few remarks on reloading:

  • functions/macros will be replaced with the new definition.

  • functions/macros in existing code may not be replaced due to inlining/macro expansion.

  • CLOS classes will be updated, its instances will be lazily updated.

  • Structure definitions will be updated, existing structure instances will not be updated.

  • DEFVAR replaces a value if one doesn't exist. DEFPARAMETER always replaces a value.


Just use load again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜