Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I'm a C programmer and I love Go. A very important feature that I think Go need is if you can use GC or not. I'll explain, GC it is useful in certain contexts but in other contexts no, for example in system programming. So I think for example one possible thing it could be
I rest avaiable to further clarifications.
Perhaps it should be the other way around, I'd rather not break every existing Go program!
Also, while it's a good idea, Go doesn't make a distinction between pointers on the heap vs the stack, so you can't be entirely sure which memory you need to free and which ones you don't. Another confusion would be that "gc" also stands for "Go Compiler" (lowercase typically means Go compiler, uppercase means garbage collector)
On the other hand, I'd imagine that this would reduce the runtime size and speed up the program if you know what you're doing.
It'd also be weird to have libraries that have GC interacting with libraries that don't have GC. I feel like that'd complicate things a lot
Go is not C. The garbage collector is an essential component of the language. At this stage of the language, what you propose would be an extremely invasive change which would go against the overall design choices made by the language.