jank
jank copied to clipboard
REPL returns `nil` or throws when no value provided
Worth keeping mind when implementing *1.
;; jank
clojure.core=> ;comment
nil
clojure.core=> *1
unbound@0x1094c7360 for var #'clojure.core/*1
clojure.core=> #_a
nil
;; clj
user=> ;comment
user=> *1
1
user=> #_a
<nothing happens>
Similiar oddity for \<enter>
;; jank
clojure.core=> \
clojure.core=>...
nil
;; clj
user=> \
Syntax error reading source at (REPL:2:1).
EOF while reading character
Or even just pressing enter:
;; jank
clojure.core=>
Exception: unable to map file /var/folders/s5/309818k92r92zn9c_nzvmnzc0000gn/T/jank-repl-e833.jank due to error: unable to map file
;; clj
user=>
user=>
\ and then enter is a hack we have in place right now to allow multi-line REPL code. It should be replaced with logic to detect unexpected EOF and wait for more input.
The other notes here I think are valid bugs.
Pressing enter now throws instead of nil.
clojure.core=>
Exception: unable to map file /var/folders/s5/309818k92r92zn9c_nzvmnzc0000gn/T/jank-repl-1ca7.jank due to error: unable to map file