-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
The null and undefined should be added to false values #330
Comments
Several Scheme implementations have an "unspecifed" or "void" value. It is returned by procedures where RnRS says the return value is unspecifed. JS The unspecified/void value is not considered false. This is intentional. |
RnRS has no clear equivalent to JS |
Thanks will check. |
Maybe I should add warning when |
Kawa have (unless #!null (display "x\n"))
;; ==> x
(when #!void (display "x\n"))
;; ==> x so |
That might be a good idea.
That probably makes sense, because In Scheme, |
For example, But |
Accord to Scheme spec
#f
should be the only falsy value, but LIPS use two constants from JavaScript :null
andudefined
. I was caught multiple times when usingString::match
when I didn't use:(not (null? x))
.This will simplify user code if both
null
andundefined
are false values. So the old behavior will be restored.It's kind of silly that
null
andundefined
aretrue
.It's intuitive to write:
The text was updated successfully, but these errors were encountered: