7 ms·
The worst thing about C++ is the endless sequences of choices you need to make about tooling before you even write a line of code. This is actually what made me
by alexhutcheson 7y ago
The worst thing about C++ is the endless sequences of choices you need to make about tooling before you even write a line of code. This is actually what made me switch to Go for personal projects - I'm a professional C++ programmer, but setting up a development environment required so many choices and so much futzing with various tools that I would spend all my energy getting set up and never make progress on the projects themselves.
Go, Rust, and even Java are all way better in this department - the tools are standard enough that you only have to make a choice if you are doing something less common. I would love a Dropwizard-like bundle that just gives me a pre-set-up config with everything I need to write a C++ CLI app or daemon.
- codesushi42 7y agoEven Java? Java's tooling is top notch. IDE is awesome. Debugging tools are rawsome. Build tools can be... Well you've got choices. Workspace setup is easy
- alexhutcheson 7y agoAgreed that Java tooling is amazing. The only reason I said "even Java" here was the fact that you have to choose a build system from a handful of fairly popular options, which adds some up-front cognitive overhead to your project vs. Go or Rust.
- hermitdev 7y agoIve spent a good part of my 20+ year career wrangling c++ dependencies, and it's hard. MS has introduced vcpkg, which should make things better, closer to a pip or npm style package manner, but I haven't used it, so I have no idea how well it works.
- de_watcher 7y agoI stick to Debian/Ubuntu Linux. Its package manager is essentially the package manager for C++ from the beginning.
- batty_alex 7y ago> ...wrangling c++ dependencies Yep, I think this is my main gripe with C++ on Windows right now. vcpkg is meant to work with CMake or Visual Studio, but you still have to manually tell it where your toolchain file is - which means it's additional work for the rest of your team. In Visual Studio, it's seamless. On Windows, it's gotten to the point where I try to build dependencies as part of the build chain and hope the tooling is smart enough to not rebuild them a million times. Would be really nice if Windows 10X (or whatever) could come with a package manager or integrate vcpkg.
- pjmlp 7y agoYet I never wait for C++ builds like I do with Rust ones, due to lack of support for binary libraries. That is currently my number one grievance, 2nd is lack of tooling that matches C++ for Windows/.NET developers.
- zozbot234 7y agoRust does support binary libraries. You just have to interoperate with them via the system/C ABI. It doesn't support binary crates, but a crate is just a compilation unit, like a file in C/C++. Do people commonly use binary .o files in C/C++ across compiler versions? That would be the equivalent of what you call "binary libraries".
- pjmlp 7y agoNaturally I was speaking about binary crates. Yes we do, all the time on Windows, as .lib, .dll or plain COM (now UWP). Dynamic libraries and COM are an OS ABI, as such compiler agnostic. And for compiler specific versions, well known libraries do bundle pre-compiled libraries to latest three versions of e.g. VC++, ICC and C++ Builder. Watching the same crates being compiled over and over across projects isnt' fun. And the workaround with a common workspace only kind of helps.
- gpderetta 7y agoRight. I would say that any large C++ project, especially one with multiple binary targets, will naturally split the code base in dynamic or static libraries.
- pjmlp 7y agoYep and in large organisations the compiler version is anyway managed by IT, thus all teams can get to share common binary libraries.
- self_awareness 7y agoIf you standardize on CMake, lots of up-front choices go away, and will be converted to options which can be changed on per-developer basis. CMake can generate the whole project part for lots of different developers, allowing the devs to use practically any IDE they wish. Plus, you'll get a properly configured project with automatic dependency tracking. I don't understand why CMake isn't used by default. (or Meson)
- jhasse 7y ago> (or Meson) C++ in a nutshell :D
- self_awareness 7y agoI think I see what you're trying to point out ;), but both meson and cmake will allow you to use different tools to do development ;)
- bonoboTP 7y ago> I need to write a C++ CLI app At first I thought you meant this obscure little language: https://en.wikipedia.org/wiki/C%2B%2B/CLI https://en.wikipedia.org/wiki/C%2B%2B/CLI
- batty_alex 7y ago> The worst thing about C++ is the endless sequences of choices you need to make about tooling before you even write a line of code. I don't know about endless. CMake is supported in almost every IDE toolchain these days, so there's your build generator. Compiler choice may as well be down to the platform you're developing on. > I'm a professional C++ programmer, but setting up a development environment required so many choices Me too, and it's about as complicated as Java or any other language I've worked in. > I would love a Dropwizard-like bundle that just gives me a pre-set-up config with everything I need to write a C++ CLI app or daemon. Visual Studio, CLion, QtCreator all do this. They'll even add your main.cpp to your CMakeLists.txt for you. Now, if we're talking dependency management on Windows, I'm all about griping there. vcpkg is not quite the drop-in solution Microsoft makes it out to be.