Hacker News new | ask | show | jobs
by cmrdporcupine 1363 days ago
I don't like Go, but I think I would use that.

But I'm ignorant: is the Go runtime built in any way to accomodate third party languages? Apart from writing an interepreter in Go, is there a good way to target it?

2 comments

No it's not. That's why you haven't seen many alternate languages.

Something else is that the semantics of the Go language itself are purposely limited in ways that help build an efficient runtime easily. So even if you could target the Go runtime easily, it would impose limits to what the language can do as I understand.

This is just an assumption, but it might be possible to translate to Go assembly and then use the Go toolchain.

Edit: https://github.com/minio/c2goasm seems to slightly go in that direction.

Go assembly is just a slightly funny version of the target platform's assembly. At that point, you might as well just assemble for the target directly and avoid the quirks of Go's assembler.