Subject: Re: OPFR [was: Re: Road to Clojure...]
From: (Rob Warnock)
Date: Sun, 15 Feb 2009 07:45:31 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Marco Antoniotti  <> wrote:
| (Rob Warnock) wrote:
| > "OPFR" == "Outer-Parenthesis-Free REPL". It's a meme/pattern/library(?)...
| > ...a command-line reader that wrap a set of parens around whatever the
| > user types and then passes that to EVAL [with some minor tweaks so the
| > most common cases "do the right thing"]. ...
| Ok. I use it pretty often in LW.  It does exactly that.

Interesting. A couple of questions about the LW version:

- Will it let you continue a line? E.g.,

     opfr> + 1 2 \
	     3 4


- OPFR tries to guess whether a single symbol on a line is a function
  or a value and "do the right thing". This creates an ambiguity if
  a symbol has both a functional and variable value. OPFR favors the
  functional value, since you can always get the variable value by
  prefixing it with VALUES, e.g.:

      opfr> get-universal-time

      opfr> most-positive-fixnum

      opfr> defun foo () "A function value"

      opfr> defvar foo "A variable value"

      opfr> foo

      "A function value"
      opfr> values foo

      "A variable value"

  How does LW handle that?

- Because of the previous, one can overload naked keywords as "commands",
  if one likes. OPFR currently uses only :Q (and :QUIT), but others
  could be added easily. Does LW do anything like that?


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607