3 ms·
Re-reading the original post I see what you mean now. But Clojure definitely fits the first part of the definition by compiling your methods instantly as you're
by jhhh 4y ago
Re-reading the original post I see what you mean now. But Clojure definitely fits the first part of the definition by compiling your methods instantly as you're writing them in the repl. For the second part I'm not aware of a prompt which would let you define a method in response to a missing function call. Might be an interesting feature.
- cyberbanjo 4y agoFor the second part: with restarts and conditions, CL pulls up an interactive debugger that asks if you would like to abort, continue/retry calling undefined or supply a definition now, amongst others. Evalutating this in CL (SBCL) (undef-fn) gives: Restarts: 0: [CONTINUE] Retry calling UNDEF-FN. 1: [USE-VALUE] Call specified function. 2: [RETURN-VALUE] Return specified values. 3: [RETURN-NOTHING] Return zero values. 4: [RETRY] Retry SLY interactive evaluation request. 5: [\*ABORT] Return to SLY's top level. 6: [ABORT] abort thread (#<THREAD "slynk-worker" RUNNING {100288C7E3}>) [... as well as a clipped stack trace ...] Pressing 1 will allow you to name an alternative function in a minibuffer prompt, 2 lets you set the return value of the undefined fn, etc.