-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Remove allowing string argument in (read) #327
Comments
with idiomatic Scheme you can use string ports from SRFI-6. (let* ((str "(1 2 3)")
(port (open-input-string str)))
(with-input-from-port port read))
;; ==> (1 2 3) (define read (let ((read read))
(lambda (arg)
(if (string? arg)
(let* ((port (open-input-string arg)))
(with-input-from-port port read))
(read arg))))) |
Traditional:
I recommend adding |
Thanks, for the tip. |
It seems that with-input-from-string is even in WikiBook about Scheme. BTW: it's worth linking to this book from the website. |
Also in Common Lisp. I'll add a link to the wikibook, thanks! |
This will be real braking change, but the code doesn't work correctly anyway:
You will still be able to use
lips.parse
, to get the same behavior:With this the read can be patched to get the old behavior:
The text was updated successfully, but these errors were encountered: