3 ms·
On the other hand, there are some bad Go standard libraries that are frozen in time.
by 0cf8612b2e1e 1mo ago
On the other hand, there are some bad Go standard libraries that are frozen in time.
- rirze 1mo agowhich, as painful as it may be, is ok. Better to have a safe functional stdlib library than a exposed external crate (which then asks the question; what's the replacement...)
- lesuorac 1mo agoThose aren't the only two choices. We also have the classic example of PHP with numerous not safe stdlib ways to use mysql. To me the answer is still to vendor your dependencies and don't be on the bleeding edge of updates unless you're willing to invest the time into validating them.
- kergonath 1mo ago> We also have the classic example of PHP with numerous not safe stdlib ways to use mysql. I think it goes without saying that emulating PHP is rarely a good decision.
- VorpalWay 1mo agoDon't forget C++ where large parts of the standard library are unusable (regex is slow and unfixable) or soft deprecated (dont use iostreams for formatting, use std::format, etc). No, I prefer what rust is doing. It suits a system programming language. Which is what Rust is.
- pjmlp 1mo agoRegex does the job for most business software, iostreams is alright, using them since 1993, std::format is cool provided one has control over their compiler version,...
- VorpalWay 1mo agoRegex is absolutely not suitable for most use cases that I have come across. Iostreams formatting is awful, especially if you care about internationalization (which is very common). Not sure what the issue with std::format would be here, you would have to elaborate. Obviously you need to specify a minimum version to have support for it at all.
- pjmlp 1mo agoIt works good enough for stuff I would be using Java or .NET for. Not every application requires internationalisation, especially server code or internal company tools.
- bigstrat2003 1mo agoWhich isn't actually a problem. You can ignore the bad standard library and use something different.
- pjmlp 1mo agoYeah, but I will take a not great library that works everywhere the compiler does, than be at the whims of which platforms are supported by 3rd party libraries. I can use most of the clunky Python, Java, .NET and if it must be, Go, standard libraries, than hunting down for dependencies with platform tier support and such.
- pie_flavor 1mo agoPlatform support is a non-issue for every library being discussed. This is an array construction macro, it has nothing to do with what operating system you're running on.
- pjmlp 1mo agoJust because some trees have a specific trait, it doesn't mean the whole forest is the same.
- imtringued 1mo agoYour argument only works for no_std crates, but the std exists and allows the vast majority of crates to be cross platform out of the box.
- pjmlp 1mo agoI bet there are plenty of them that don't work on IBM i, while Java does fine there. Just to quote a possible scenario among others.
- dwattttt 1mo agoAdd more and more to a standard library, and you're going to start losing your "works everywhere".
- pjmlp 1mo agoNaturally there is a balance, still I think Java, .NET, Python, Go, Smalltalk, manage quite well, while having subsets to slim down when needed for specific deployment scenarios like embedded devices.