During the design of the Go language it has been a conscious decision to ensure compilation would be small.
The biggest problem wrt compilation time in C and C++ is the archaic dependency management system, text source inclusion which means that a lot of work have to be performed for each translation unit even if it has already been done in another.
Additionally, C++ library tend be template-heavy and template instantiation is a lot of work for the C++ compiler.
Finally, when dealing with with optimized builds, C and C++ compiler apply more optimizations (which makes the compilation slower) whereas the Go compiler only apply a subset of the optimizations.
For more details look at this stackoverflow.com/questions/297663...
Makes me think, why can't a language have both development compilation (i.e. fast, therefore, faster dev cycle, but not sacrificing developer's experience); and slow compilation (i.e. highly optimized)?
I realized that there might be multiple languages tried after C, but before Go; but for some reasons, Go is quite successful.
Makes me think, why can't a language have both development compilation (i.e. fast, therefore, faster dev cycle, but not sacrificing developer's experience); and slow compilation (i.e. highly optimized)?
I don't think there is a reason it wouldn't be possible, it just need to be done and might have already been. I haven't tried newer language like rust, zig and the like yet so maybe one of them offer this and I don't know
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
During the design of the Go language it has been a conscious decision to ensure compilation would be small.
The biggest problem wrt compilation time in C and C++ is the archaic dependency management system, text source inclusion which means that a lot of work have to be performed for each translation unit even if it has already been done in another.
Additionally, C++ library tend be template-heavy and template instantiation is a lot of work for the C++ compiler.
Finally, when dealing with with optimized builds, C and C++ compiler apply more optimizations (which makes the compilation slower) whereas the Go compiler only apply a subset of the optimizations.
For more details look at this stackoverflow.com/questions/297663...
WoW, perfect SO discussion.
Makes me think, why can't a language have both development compilation (i.e. fast, therefore, faster dev cycle, but not sacrificing developer's experience); and slow compilation (i.e. highly optimized)?
I realized that there might be multiple languages tried after C, but before Go; but for some reasons, Go is quite successful.
I don't think there is a reason it wouldn't be possible, it just need to be done and might have already been. I haven't tried newer language like rust, zig and the like yet so maybe one of them offer this and I don't know