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

true and false need to be removed from Parser #292

Closed
jcubic opened this issue Jan 26, 2024 · 1 comment
Closed

true and false need to be removed from Parser #292

jcubic opened this issue Jan 26, 2024 · 1 comment
Milestone

Comments

@jcubic
Copy link
Collaborator

jcubic commented Jan 26, 2024

This will be a breaking change, but because of true and false are constant values like #t and #f this code doesn't work:

(define-syntax foo
  (syntax-rules ()
    ((_ true)
     '(list true))))

(let ((x #t))
  (print (foo x)))

the code is based on aif macro from SRFI-139.

To be compatible with Scheme, those constants need to be removed from Parser and added as aliases.

It will be a breaching change because of code like this:

Old code

'(true)
;; ==> (#t)

New Code:

'(true)
;; ==> (true)

true and false will be normal symbols.

@jcubic
Copy link
Collaborator Author

jcubic commented Jan 26, 2024

There are still null and undefined I'm not sure if they should also be removed from the parser.

@jcubic jcubic closed this as completed Jan 26, 2024
@jcubic jcubic added this to the 1.0 milestone Jan 26, 2024
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

1 participant