Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Compiler overhaul: the plan. Not a rewrite. Translate the C compilers to Go. Write and use an automatic translator to do this. Start the process with Go 1.3 and continue in future releases.

Aww. Transliterated C code does not sound like it will take full advantage of Go idioms. Plus, an automatic translator? Unless it is extremely disciplined C code, that sounds harder than just translating it by hand.



Plus, an automatic translator? Unless it is extremely disciplined C code, that sounds harder than just translating it by hand.

It's the only way you can port without halting ongoing development. Done it. Been paid for it. It works.

EDIT: Also, if your original is highly idiomatic, and you exploit this, you can produce idiomatic code in the target language.


> Done it. Been paid for it.

Did you work on Go's translator or a different translation project?


Different one. Call center software.


Form what language to what language ?


IMHO this is the most ambitious and interesting part. It will be a major undertaking but if it works it will open the gates for the translation of a myriad of projects that would definitely benefit from being written in Go. Maybe this will even entice more developers to contribute to abandoned C projects too difficult to read and modify in their current form. Hey, one can dream.


They'd take advantage of go idioms after they've got a working compiler, a transliterated from C working compiler. Not only is translating manually boring, it's also less effective. The bugs from an automatic translator would all be from a similar class.


It's already pretty paranoid C, so the transliteration should actually be pretty plausible.


I do feel like they may be underestimating the difficulty of putting together automatic translator code...


Yes, because Rob Pike is so inexperienced. You should explain to him what he's getting in to.


Russ Cox is the one who is doing the compiler translator. He is not going to be out of his depth.


That's interesting, I didn't know that.

Doesn't really change the point, of course. :)


See http://golang.org/s/go13compiler for the full story. It explains the rationale in detail.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: