Marco Antoniotti <firstname.lastname@example.org> wrote:
| email@example.com (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 \
- 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> defun foo () "A function value"
opfr> defvar foo "A variable value"
"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 <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607