4 ms·
Would be nice if this could be made into a more general tool, would be a cool way to modernize older libraries and reinvigorate new development into them
by kanwisher 12y ago
Would be nice if this could be made into a more general tool, would be a cool way to modernize older libraries and reinvigorate new development into them
- dsymonds 12y agoThat's been proposed, but it won't happen. There's too many edge cases, and it only works on the Go compiler because it has a particularly constrained style and rsc can make the relevant hacks as a one-off effort.
- marco2357 12y agoWhy not? There's not that much of a difference between translating C to assembler or a high level language like Java/C#/Go. The main challenge is to make the code readable. But basically someone just has to sit down and do it right.
- lmm 12y agoMost libraries that are still in C are in C so that people can embed them from many languages, or because they need to be used in scenarios where GC is unacceptable. I don't think many libraries that have remained in C (and not used e.g. D, or OCaml, or Haskell) will be suitable for migration into Go.
- haches 12y agoFriend of mine does fully automatic translation from C to Java, including automatic OO reengineering. Some demos are available on his page: https://www.mtsystems.ch https://www.mtsystems.ch This work is based on the stuff he did for his PhD. I think his largest test case so far is a full translation of VIM.
- marco2357 12y agoMain author of the tool here. If you have questions feel free to contact me: marco.trudel@mtsystems.ch
- rsc 12y agoI'd certainly be happy if someone wants to do that. I'm not planning to. For this kind of thing my instinct is that the delta from "useful tool that gets you 90-99% of the way there" to "general tool that just works" is at least 2x if not 10x the effort. For what I'm doing, the 90-99% is fine and then I can fix the rest by hand.