logoalt Hacker News

krior • today at 7:24 AM • 4 replies • view on HN

The alternative is that everyone is implementing half-baked, bug-ridden "standard"-functionality for every one of their projects. Is that so much better?


Replies

bayindirh • today at 8:38 AM

I haven't seen what you are talking about. Eigen is not half baked, nor FLAME, nor RapidXML or OpenAL. Same goes for Option++, Easylogging++ (though it's recently deprecatd).

We have search engines and web registries, and they precede package managers mostly. Moreover, Linux distributions' repositories acted as a directory and everyone used these packages, which were not half-baked either.

It's not the optimal solution, but it's better than leftpad, proc-macro2 (and associated drama), and 5-link deep dependencies I have seen any programming language which has first-class packages support (incl. Go and Rust).

In my opinion, assembling a set of libraries by hand and vendoring them is way better than getting a logging library and pulling the whole world with it.

coryrc • today at 8:34 AM

False dilemma. Another alternative is curated libraries. Plus C++ leftpad never will exist because the standard library covers a lot of functionality. Then there's Boost.

maccard • today at 8:44 AM

I personally think that standardising std print a mistake (for example).I’ve never worked anywhere or used any project that would use it, and fmt has already left it behind functionality wise. I think the method it was standardised in is a cop out - it being a library type means that I could implement my own without the “baggage” of what print has.

If c++ added something like fstring’s or C#’s $ string then I would be able to use that functionality in my multi million line code base, and as a language feature the compiler can do more with it than it can do with a random function call.

account42 • today at 8:36 AM

That is often better, yes. But it is also not the only alternative - after all, one of the reasons that C will never die is that it's the lingua franca of the ABI world, which kinda implies that writing shared libraries in C may be a thing.

➕ show 1 reply