David A. Wheeler wrote:
Well, I don't dislike the idea, but I think that there are better solutions, namely intelligent prompting (see below).I have an idea, and wonder about the pros and cons. The basic idea is, "what if initial whitespace (space/tab) at the toplevel DISABLED I-expressions?" (this is the REVERSE of my earlier approach).
If you mean that the first line is indented then yes, this is a good
idea - but, notice that it must work the I-_expression_ way if not, or
you wpn't be able to mix in S-expressions within I-expressions.This could be helped by not printing the empty line of an ENTER ENTER, just the main prompt again. Consider the following session (with proper prompting:2. It enables relatively easy command-line interactions. Currently, if you have many one-line interactions at the command line, you have to press ENTER ENTER after each one. Ugh; not only is that more keystrokes, but that quickly consumes precious vertical space. If users insert a space before a one-line command, it can be executed immediately. user presses ENTERsugar>+ 1 2 user presses ENTER againsugar>+ 1 2-----> Andsugar>+ 1 23 sugar> user presses ENTERsugar>+ 1 2 user enters some more expressions:sugar>+ 1 2-----> sugar>+ 1 2-----> * 3 -----> + 5 6 -----> user presses ENTER sugar>+ 1 2 -----> * 3 -----> + 5 6 36 sugar> Also, I must add that that would be very cumbersome in interactive mode too :(Originally I had proposed using indentation to REQUIRE indentation interpretation. But that doesn't work well, because of limitations on peeking (one-char-only) and unget (Scheme has none, Common Lisp only one char). /Egil |
signature.asc
Description: OpenPGP digital signature

