3 ms·
>I think the stdlib is not the way to go. Give me an example of any ecosystem where the standard library is the defacto best solution? Python, Go, C++'s STL, J
by coldtea 12y ago
>I think the stdlib is not the way to go. Give me an example of any ecosystem where the standard library is the defacto best solution?
Python, Go, C++'s STL, Java SDK, to name a few.
They might not be 100% perfect, but they are good and reliable, and always there for you. Hunting the latest "best" library that gets abandoned after a year (like in Javascript and Ruby often happens, and also Go too) gets old quickly.
Of course there could be a compromise approach, as you say.
A mininal standard lib for Rust PLUS a "blessed" set of Cargo packages that represent the batteries (Haskell "Platform" is like that, IIRC).
- isaacaggrey 12y ago> Java SDK Hardly. See Joda Time (it only took 10 years for java.time to catch up) and Apache Commons (the situation is much better now, but who hasn't turned to Apache Commons due to shortcomings in Java's standard library?). In any case, I definitely agree with the frustrations of trying to find libraries for Ruby.
- coldtea 12y agoAgain, people have seem to miss the point I was making. I wrote that those batteries "might not be 100% perfect" -- and as a Java programmer back in the '00s, I know the specific problem points with Java time that Joda tried to solve (btw, it has inspired the time lib in the latest SDKs IIRC). The thing is, the JDK APIs, with all their issues have been a genuine force in Java adoption, and something every Java programmer relies on. Of course there'll be some pain points, but it's nothing like having to hunt for a Collections or DB abstraction or String manipulation or XML etc lib each and every time you start a project. Having an official batteries API doesn't preclude you from using external libs (like Joda) when they are better -- whereas not having one is a genuine loss. If I have turned to Apache Commons that was overwhelmingly for things MISSING from the SDK, not for things the SDK already did. And don't get me started on the Commons code quality, with BS reinventions of the wheel, lame FactoryFactoryProxyFactorySingletonFlyweightFacades and the like, and code that was blisfully ignorant of enconding issues...
- ayrx 12y agoI love Python and Python's standard lib but it's hardly the defacto best solution. urllib gets trumped by requests, ujson is much much better than the stdlib json module, hardly anyone still uses distutils over setuptools for example.
- shadowmint 12y agoWoah, that's like a list of what not to do with standard libraries, particularly python. Have you seen the datetime module? httplib? Even go has it's weird databases module. I think <stdio.h> is a good example. It gets the job done, its minimal and simple. That's what a standard library should be.
- humanrebar 12y ago> I think <stdio.h> is a good example. It gets the job done, its minimal and simple. It also routinely takes null-terminated strings without pairing it with a size parameter.