3 ms·
I think I'd like C++ much more if it had a proper package manager. I know there's Conan and a few others but having an official way to install a library would b
by ThePhysicist 5y ago
I think I'd like C++ much more if it had a proper package manager. I know there's Conan and a few others but having an official way to install a library would be so great. I recently got back into game programming as a hobby and dusted off some of my old C++ projects from 2010, and while I was able to get them up and running again (which I guess speaks for C++ as well) it was pretty painful and involved downloading and installing several packages by hand.
Using languages like Go, Python or Javascript feels much more seamless as you can just say "pip install ..." or "npm install" or "go get ./..." to install all your dependencies (there are pitfalls there as well).
- xscott 5y agoI've seen this complaint a lot, but I don't get it. For C++, the system package manager (yum, apt, pacman) seems sufficient to install most anything I've ever needed. Are you programming under Windows? My biggest complaints about C++ generally revolve around all the inconsistencies / special cases, and I believe these are mostly in the name of backwards compatibility. For any of the major compilers: - Integer literals are 32 bits, even on 64 bit platforms. You almost always want a ssize_t, but you get an int, and int is almost always 32 bits. (let's dodge the religious war about unsigned vs signed) - String literals are basically const char star pointers, but you should hold them in a string class. - Even the syntax for declaring a variable is a total mess. Depending on details about foo (initializer_list, POD type, explicit constructors, etc), there are a lot of special cases in the following: foo x; foo x(); foo x(1); foo x(1, 2); foo x{}; foo x{1}; foo x{1, 2}; foo x = {}; foo x = { 1 }; foo x = { 1, 2 }; foo x = foo(); foo x = foo(1); foo x = foo(1, 2); auto x = foo(); auto x = foo(1); ... For some of those, you can't even know what's really happening unless you know the specific implementation of the type/class. And as a special bit of trivia, one of those doesn't even declare a variable. - There are a lot of special cases and non-obvious idioms around declaring constructors and assignment operators. I think it's too much to remember all the rules, so most everyone is forced to find a subset of the language out of necessity.
- duped 5y ago> For C++, the system package manager (yum, apt, pacman) seems sufficient to install most anything I've ever needed The system package manager installs globally and prefers dynamic linking. This makes it generally impossible to distribute software reliably without packaging it for the system package manager being used. Dependencies should be local to the project and prefer static linking to avoid deployment/distribution errors.