开发者

How to unload a lisp file in CLisp REPL?

开发者 https://www.devze.com 2023-01-16 15:21 出处:网络
Am able to load and call the functions but I would like to reload the file after making some corrections.

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

精彩评论

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