It looks like this interpreter is using tagged unions for values, and using the empty interface to emulate a union type. I seem to remember that we may have read something at the time that recommended using the empty interface instead of unions, though I don't remember for sure. Nice to see some interpretation efforts finally being realized in Go!
A JavaScript parser and interpreter written in Go
11–20 of 72 posts
Re: A JavaScript parser and interpreter written in Go
#12Re: A JavaScript parser and interpreter written in Go
#13This is the most Hacker News sounding title I've ever heard.
Re: A JavaScript parser and interpreter written in Go
#14Not serious. haha.
Re: A JavaScript parser and interpreter written in Go
#15Re: A JavaScript parser and interpreter written in Go
#16Earlier quoted context omitted.
No, there's not enough Redis here. It needs more Redis.
Haskel!
I'm actually really excited by all the people starting to jump in and try to learn/help. We've even got 2 really smart high schoolers doing some amazing contributions to GHC recently.
seriously: its easy to get involved in hacking on interesting open source projects. Just choose one you care about and stay excited by, and dig in!
Re: A JavaScript parser and interpreter written in Go
#17Re: A JavaScript parser and interpreter written in Go
#18I can't think of any reasonable use case. Grab little NPM ditties and incorporate them into your Go binary - Javascript to Go becomes as Lua is to C? Somebody enlighten me.
Edit: Not that this needs a use case per say, just that the intent behind it is underspecified enough for me to wonder about it.
Re: A JavaScript parser and interpreter written in Go
#19Alright, 90 points, most comments being meta about the title so I'll be the brave one and ask: What is this actually good for? I can't think of any reasonable use case. Grab little NPM ditties and incorporate them into your Go binary - Javascript to Go becomes as Lua is to C? Somebody enlighten me. Edit: Not that this needs a use case per say, just that the intent behind it is underspecified enough for me to wonder a…
Re: A JavaScript parser and interpreter written in Go
#20Alright, 90 points, most comments being meta about the title so I'll be the brave one and ask: What is this actually good for? I can't think of any reasonable use case. Grab little NPM ditties and incorporate them into your Go binary - Javascript to Go becomes as Lua is to C? Somebody enlighten me. Edit: Not that this needs a use case per say, just that the intent behind it is underspecified enough for me to wonder a…