3 ms·
Several years ago, I very don't like the way and the pace C++ introduces new features. But now the way and pace has become normal, I change my mind some. I thin
by tapirl 7y ago
Several years ago, I very don't like the way and the pace C++ introduces new features. But now the way and pace has become normal, I change my mind some. I think it is the time I should re-use C++ for some projects. It would be some restricted if these projects are written in Go, for lacking of some key features.
- sethammons 7y agoWhich features and why?
- tapirl 7y agoSpecifically, generics and immutable values. Lacking of generics lead to much repetitive code. I don't like using exported variables as final values, so I need to use functions to return the final values, which is verbose and not elegant. Lacking of read-only values also causes some unnecessary performance losses. Too network/tools oriented is also a reason. Porting C/C++ gfx libraries is not an easy job, especially multiple C/C++ gfx libraries are involved. And the performance is not high as C/C++ even if the porting is done.
- chooseaname 7y ago> I don't like using exported variables as final values, so I need to use functions to return the final values, which is verbose and not elegant. Lacking of read-only values also causes some unnecessary performance losses. This sounds like you're fighting against the language. I think a lot of developers do this. I think one should either embrace the language or find another (you did mention moving to C++).
- tapirl 7y agoI do this to adapt it, to make code more secure and serious. I embrace other features in Go but not this one. This one makes Go some like a non-serious language.
- AnimalMuppet 7y agoIn what way does it make Go "non-serious"? And, why do you care? I care about the suitability of a language for the problem I'm trying to solve, not it's "seriousness". What concrete difference does this make to programs that you're writing?
- tapirl 7y agoVariables means modifiable. Using variables as final values is bad. This is so simple that no explanations are needed.