In most character-buffered REPLs the enter key serves two purposes:
quoting a new line character and submitting input to the REPL. Some
systems like Mathematica require a special key combination like
shift-enter or control-enter to submit input. That is a clean
separation of concerns but it is awful to use, though it makes a bit
more sense in a multi-line notebook environment like Mathematica as
opposed to a more line-oriented REPL.

SBCL's REPL works as suggest but there are other REPLs that work more
like Clojure's. I prefer Clojure's current behavior by a small margin.
It feels more natural for a line-oriented REPL.

-Per

On Fri, Apr 2, 2010 at 2:23 PM, Michael Jaaka
<[email protected]> wrote:
> Hi!
>
> I think that I've found inconsistency in REPL behavior.
> Just press ENTER in REPL and you got new command prompt.
> This shouldn't work like this. New line for clojure is just a
> whitespace until it is written in quotes (with quotes it becomes an
> important char of text content). So If it is a whitespace it can't be
> interpreted. The interpreter should just ignore that fact and wait for
> another input. I know that the caret will go below to the next line
> and then it looks oddly, but it is the same when user type "( + 23" in
> one line and will end expression with "222)" in second.
>
> Just test code below and you will see what implications have current
> REPL behavior (for lazy ones, prompt is not written in new line):
> http://pastebin.com/nGY3ZkyF
>
> The output is: http://pastebin.com/fJ4X6FXA
>
> Notice the prompts in the same line. They are not in new line because
> "user enter" is never rendered/interpreted by console terminal.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to