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 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.

Reply via email to