Hi Jake & Friends, Thank you so much for awesome response and great help. I am going through all replies in detail one by one. Actually, I am working on solving a job assignment : 8-10 C++ files need to be converted to Go. As far as the technical details of the code is concerned, seems its a little complex C++ 11 code. I feel rewriting from scratch is good way to go about it but I am very new to Go Syntax , so that is the difficult part. Hence I can not myself describe what that code is actually doing, at the moment :-) Will come back soon!
Best Regards Abhishek On Thu, Jan 3, 2019 at 10:41 PM <jake6...@gmail.com> wrote: > There are so, so many ways to go about porting functionality from one > language to another. I hope you have seriously considered why you want to > make such a port. The answer to that will likely, in part, drive your > strategy. In addition the nature and size of the code base, and your > timeline, will effect the strategy used. > > I would note that any tool that ports from C++, or even C, to Go is going > to produce ugly, unmaintainable, and non-idiomatic code, at best. Turning > that into real Go code would still be a major project. There is a great > video about the process that the go team used to convert the compiler from > C to Go, but I can not find it now. > > Have you considered rewriting from scratch? That can often be less painful > that one might think, if you already have a really good suite of > "functional level" tests that you can use to ensure functional continuity. > > Another strategy that comes to mind is to use cgo to do the rewrite one > component of library at a time. This could be done one of two ways. Either > keep the program (or library, or whatever it is,) as a C++ app, and call > into your converted go code. Or, conversely, write a go program that calls > into C++ for unconverted functionally. > > Of course, with no real information about what you have, or what you are > trying to achieve, you can only get general advice. > > Good Luck. > > > On Wednesday, January 2, 2019 at 10:37:17 PM UTC-5, aureal...@gmail.com > wrote: >> >> Hello All >> >> I have C++ 11 source files which I need to convert to Go language code >> Is there any converter tool for this. >> I google quite a few tools, none seems powerful and complete enough to do >> the job.for me. >> Please help >> >> Thanks >> Abhishek >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "golang-nuts" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/golang-nuts/aPHLrfwQh3A/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.