Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL returns nil when no value provided #205

Open
frenchy64 opened this issue Jan 30, 2025 · 1 comment
Open

REPL returns nil when no value provided #205

frenchy64 opened this issue Jan 30, 2025 · 1 comment

Comments

@frenchy64
Copy link
Contributor

frenchy64 commented Jan 30, 2025

Worth keeping mind when implementing *1.

;; jank
clojure.core=> ;comment
nil
clojure.core=> *1
unbound@0x111f53d20 for var #'clojure.core/*1

;; clj
user=> ;comment
user=> *1
1

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=>
nil

;; clj
user=>
user=>
@frenchy64 frenchy64 changed the title Lone comment in REPL returns nil REPL returns nil when no value provided Jan 30, 2025
@jeaye
Copy link
Member

jeaye commented Jan 30, 2025

\ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants