In Emacs + Slime with sbcl, as soon as I define a function (or more) in a file, I have two options:
The second also creates the .fasl file.
What are the differences between the two?
What happens under the hood when compiling a definition / file?
What are the advantages and disadvantages of each?
, eval [1], ( ) CL . CL : . , . CL , . , eval . (, SBCL , , sb-ext:*evaluator-mode* :interpret, CLISP ).
eval
sb-ext:*evaluator-mode*
:interpret
compile-file [2], - . .
compile-file
, CL 3 : , . , , ( ) CL eval-when [3].
eval-when
, C-M-x eval-defun eval . , , . C-c M-k compile-file compile-file , .
, .
, , , . , . , -, . . , , . 2 :
, , . , , , , ( ), .
, . (, Common Lisp), . "" - . - . , . () , .
, 2 :
: , , , 2- . , , , , , .
, SBCL REPL ( ) . , .
, , sbcl, , , Common Lisp.
, . , , - ; , , .
, - , .
, , eval-defun , , .
, - , SLIME Emacs, C-c C-c, ( M-x slime-compile-defun). ( ) , +, . , Flymake ( , , ).
, , . , , , . , -, , () - , , , .
Eval'ing defun - - SWANK, . , Lisp - , , SLIME .