| CGO not go Borrow a word from jwz
Some people, when they face a problem, think "I know, I will use CGO". So now, they have two questions.
I am very worried about the recent use of CGO on Gopher's Slack Channel, especially if there is an organization that intends to use a project to show Go, which is a bad idea. I have said many times about this, so maybe you hated my lobbying, so I thought about writing it down and doing it. CGO is an amazing technology that allows Go programs to interoperate with C's class libraries. It is an extremely useful feature, and today it achieves a position that Go cannot reach. CGO is the key to getting the Go app running on Android and IOS. However, this is only my personal opinion, I do not speak for anyone, I think CGO is overused in the Go project. I believe that when faced with the need to reload a large section of the C code written with go, programmers would prefer to use CGO to package libraries rather than go, because they think it is easier to solve the problem. I think that's a fake economy. Obviously, there are some unavoidable problems with CGO, and the most obvious problem is that as a binary blog, you have to interact with the graphics driver or window system. However, the use of CGO problems, after the trade-offs, most people think it is still relatively small. When you build a CGO library on a Go project, You may not realize that this tradeoff is not complete. |
translated 4 months ago 2 Human top top good translation! |