3 ms·
Then why even have a stdlib? Haskell has problem too, where the Prelude (a std lib imorted into programs by default) is designed for learning the language, a
by knughit 11y ago
Then why even have a stdlib?
Haskell has problem too, where the Prelude (a std lib imorted into programs by default) is designed for learning the language, and getting real work done requrequires supressing the Prelude to work around its bad performance and unsafe semantics.
- kyrra 11y agoThey wanted to help get the language off the ground. Without the stdlib at launch, I don't think Go would have been nearly as well received. I feel like it's one of the key pieces people first coming to the language like. The golang.com/x/ packages seems to be handling extending the stdlib at this point.
- nnutter 11y agoYou could view the standard/core library as the minimum need to make a language pragmatically useful. You could also view it as trying to prevent fragmentation. However, the stability of standard/core libraries is also what causes them to be "where things go to die" because changing them is very hard to do without breaking things. In the case of Go they also prefer to let third parties experiment and determine which design works best rather than trying to guess. So it's all a bit subjective hence the differing opinions. The point is it's people trying to balance trade-offs.