4 ms·
This actually looks pretty handy. Not sure why you'd think it's so terrible - how else would you capture a request in a variable to play with it in the REPL? I
by dm3 9y ago
This actually looks pretty handy. Not sure why you'd think it's so terrible - how else would you capture a request in a variable to play with it in the REPL?
I think a lot of the constraints can be relaxed during the development phase.
- lispm 9y agoThere are many ways one would do that in various Lisps during development. For example a dynamic variable could be accessible in the debug repl: CL-USER 56 > (defvar *bar*) *BAR* CL-USER 57 > (defun foo (baz) (let ((*bar* (* 1000 baz))) (break) *bar*)) FOO CL-USER 58 > (foo 5) Break. 1 (continue) Return from break. 2 (abort) Return to level 0. 3 Return to top loop level 0. Type :b for backtrace or :c <option number> to proceed. Type :bug-form "<subject>" for a bug report template or :? for other options. CL-USER 59 : 1 > *bar* 5000 The value of a lexical variable can be retrieved. CL-USER 60 : 1 > :l baz Value of BAZ is: 5 CL-USER 61 : 1 > * 5 In something like McCLIM or SLIME I would print the object to a listener and the window system remembers the value. In some other Lisp I would call (inspect foo) instead of (print foo) and the inspected values would be available in a stack of inspectors. Alternatively I would trace the functions, and the tracer would record the passed and returned objects.