Re:Include Go binary only package
by jerf on Friday April 29, 2016 @09:05AM
(#11595432)
"I also think this might help with the quest on compile times."
It should have next to no effect. Opening source files for hashing them is still dirt cheap even compared to go compilation, since you are almost certainly pulling them out of OS cache in a pure-memory operation. Make sure you're using either "go install" or "go build -i" if you aren't already, and you'll get the benefit of precompiled binaries where possible. The result should be that on average, most of the time is spent linking.
"Also, perhaps making it less useful for commercial purposes was the last paragraph:"
No, that's normal. You always have to expose the public API, because otherwise you can't use it. This has nothing to do with Go, this is a general rule. There's no (useful) such thing as a library with a hidden public interface. (I suppose in some languages you could provide one and require users to reflect their way in, but this would be a coding challenge sort of thing, not something you'd buy.)
It should have next to no effect. Opening source files for hashing them is still dirt cheap even compared to go compilation, since you are almost certainly pulling them out of OS cache in a pure-memory operation. Make sure you're using either "go install" or "go build -i" if you aren't already, and you'll get the benefit of precompiled binaries where possible. The result should be that on average, most of the time is spent linking.
"Also, perhaps making it less useful for commercial purposes was the last paragraph:"
No, that's normal. You always have to expose the public API, because otherwise you can't use it. This has nothing to do with Go, this is a general rule. There's no (useful) such thing as a library with a hidden public interface. (I suppose in some languages you could provide one and require users to reflect their way in, but this would be a coding challenge sort of thing, not something you'd buy.)