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

OneArmedIf + EmptyDefine #10

Open
jcubic opened this issue Aug 20, 2021 · 3 comments
Open

OneArmedIf + EmptyDefine #10

jcubic opened this issue Aug 20, 2021 · 3 comments

Comments

@jcubic
Copy link
Contributor

jcubic commented Aug 20, 2021

It seems this is missing. In Guile and Chicken.

(define x)
(eq? (if #f #f) x)
#t

so define without value may be another way to define unspecified value.
So those two surveys can be somehow connected or linked.

@lassik
Copy link
Member

lassik commented Aug 20, 2021

Indeed. We could merge these surveys (and maybe more) into one survey about what happens when different expressions (if, cond, define, begin, ...) have a missing body.

@lassik
Copy link
Member

lassik commented Aug 20, 2021

In some implementations, an empty (begin) returns a different value depending on the situation. (Gauche used to return the last value in a VM register.)

@lassik
Copy link
Member

lassik commented Aug 23, 2021

Some expressions to try:

(define foo)
(define (foo))
(begin)
(cond)
(cond (else))
(if #f 2)
(guard (e (else)) (error "foo"))

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

No branches or pull requests

2 participants