-
Notifications
You must be signed in to change notification settings - Fork 31
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
compile Racket symbols to js Symbol values? #246
Comments
Basically, yes. Symbol.for creates an interned symbol. Symbol("foo") is uninterned. Symbol() is basically gensym. |
Oh so it should be straightforward then and we can get rid of our |
I'm working my way through the source to understand how the AST is compiled to the IL and then to JS, so please bear with me. It looks like this is where Am I correct in thinking that instead we would remove that and allow Thinking in [(symbol? v)
(emit "Symbol(~a)" v)] |
Hey, thanks for taking this. Yes, that sounds right. You can also probably just replace the part where we do |
Fixes racketscript#246 Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) Swaps in native Symbol to provide interned (Symbol.for()) and uninterned (Symbol()) symbols. `/runtime/core/symbol.js` is now mostly a collection of utils to create and compare values.
I'll be able to take a look at this early next week. Thanks again for doing this. |
js has Symbol values now: https://developer.mozilla.org/en-US/docs/Glossary/Symbol
Would it be appropriate to compile Racket symbols to these js values?
(@samth Do you know if these would be compatible with Racket symbols, eg interning?)
The text was updated successfully, but these errors were encountered: