Hmmm...  functions as commands at a REPL.  Now I feel silly for
considering the keyword approach :)

On Dec 11, 5:26 pm, Dan Larkin <d...@danlarkin.org> wrote:
> On Dec 11, 2009, at 3:04 PM, Sean Devlin wrote:
>
> > Wouldn't ::quit do the same thing?
>
> It wouldn't, because the repl is evaluating in the context of wherever you 
> put the (debug-repl) call, so its namespace won't be "dr".
>
> What about instead of using keywords for commands, we use functions for 
> commands:
>
> (debug-repl-quit)
>
>
>
> >> One possible implementation of this is to use keywords as commands to the 
> >> debug-repl. Since evaluating a keyword (alone on a line by itself) is 
> >> seldom interesting, we could use ones like :quit or :pop as commands 
> >> intercepted by the debug repl before evaluation. We could even respond to 
> >> a set of commands and send any unrecognized commands along to the 
> >> evaluator.
>
> >> If hijacking namespace-less keywords for that purpose is distasteful, we 
> >> could also put the commands in a namespace, for example:
>
> >>         :dr/quit

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to