3 ms·
Word. Another fun transpiling project I have been mulling over is a Go-to-Kotlin transpiler. With Kotlin coroutines (and accompanying kotlinx lib) I think it ha
by kodablah 8y ago
Word. Another fun transpiling project I have been mulling over is a Go-to-Kotlin transpiler. With Kotlin coroutines (and accompanying kotlinx lib) I think it has the entire feature set covered though duck typing requires a creative solution but it's not too bad.
Keeping on the non-practical, fun note, I wrote a transpiler in the other direction[0]. It compiles Java bytecode to Go code. It works decently actually but I stopped work on it because my approach strains the Go compiler too much[1]. I even started emulating some of the base Java calls as Go calls, but that became tedious too.
0 - https://github.com/cretz/goahead https://github.com/cretz/goahead
1 - https://github.com/golang/go/issues/18602 https://github.com/golang/go/issues/18602