Hacker News new | ask | show | jobs
by kodablah 2187 days ago
One wonders, once it is GA, if there is value in a Go transpiler. There is a lot of useful software in Go land that would be immediately useful for Crystal devs, and Go itself is not too complicated to map to another language with the same features (a few of the runtime features will have to be emulated).
1 comments

How would this be achieved? Could you expand a little on this idea?
Literally convert Go code to Crystal code. I have not looked into Crystal enough to confirm it's features are a superset of Go's. For example, I saw that Kotlin w/ the advent of their coroutines, had most of Go's features so I wrote a transpiler[0] that got pretty far (can run all of this [0]). I abandoned the project because I have abandoned the JVM.

0 - https://github.com/cretz/go2k 1 - https://github.com/cretz/go2k/tree/master/compiler/src/test/...

an IR interface, lol