How many interesting SE jobs use C++ anymore? Is anyone using it for new projects?
Modern C++ Programming Course
141–150 of 221 posts
Re: Modern C++ Programming Course
#142> Heap Memory - new, delete Keywords Should "modern" C++ even use new/delete? I'm a C++ n00b, but I thought these can be avoided entirely now.
I noted that - IMHO one of the big advantages to "modern" c++ is the focus on the lifetime of objects with smart pointers rather than the mechanics of heap allocation and pointers. Pushing that down to chapter 19 as "Advanced Topics" seems like a mistake. Arguably the same with std::array vs object[] - the first should "probably" be the default now for teaching new programmers, so covered first (or at least highlight…
In my experience, every useful C++ application requires wrangling some historic smart pointers implementation: Boost, Unreal, libwebrtc, Qt.
Even NVIDIA uses its own smart pointers (thrust::device_ptr) though that's understandable. Also there's stuff like this: https://stackoverflow.com/questions/65938991/how-to-use-lamb... for e.g. TensorRT.
Re: Modern C++ Programming Course
#143Earlier quoted context omitted.
It depends on what you target. I do alot of Kernel and really low level C++, and it's a completely different style than even app dev, so you have to be sure you don't go down the completely wrong route. For my target space, there's a few rules for c++. Footguns: A. No STL, it causes to much bloat when binary size is critical. B. (almost) No inheritance or virtual functions. Again, it causes some bloat and adds in som…
I would add constexpr (I guess it might be included with templates?). You can do some nifty stuff like generate CRC lookup tables at compile time without hardcoding them.
Re: Modern C++ Programming Course
#144Earlier quoted context omitted.
I find it absurd that a programming language which compells someone to set up a containerized OS just to manage their build toolchain could be considered "modern".
I install Rust's toolchain and development tools inside of a container, I also do this with Python and will do it with C++ sometime in the future. I don't do this because I have to, I do this because I prefer to keep non-system -critical software managed by non-root users and separated from the systems rootfs. On your common desktop Linux distro, I think C and C++ toolchains are the least difficult to setup and use w…
Re: Modern C++ Programming Course
#145I've been setting up my little docker image that has both llvm/clang/tidy/clangd and gcc inside with boost with an idea I'd run it and from outside use it to code with live checking and compiling without littering my OS. Now, I feel like I'm doing something that already exists but couldn't really find what everyone use, ought of those that would prefer such a setup. Debugger within is probably a pipe dream, but who k…
Re: Modern C++ Programming Course
#146Re: Modern C++ Programming Course
#147Earlier quoted context omitted.
I find it absurd that a programming language which compells someone to set up a containerized OS just to manage their build toolchain could be considered "modern".
I install Rust's toolchain and development tools inside of a container, I also do this with Python and will do it with C++ sometime in the future. I don't do this because I have to, I do this because I prefer to keep non-system -critical software managed by non-root users and separated from the systems rootfs. On your common desktop Linux distro, I think C and C++ toolchains are the least difficult to setup and use w…
The thing is, you don't need to do this with Rust as far as I can tell. There may be some benefits, but ultimately your project can easily specify its own compiler version, its own target directory (the default is per-project), etc. There are some shared resources like caches, which you can split if you want to.
I can see why you'd still do this - but, the main reason would be... if you have dependencies on C/C++.
Re: Modern C++ Programming Course
#148I’m curious, if you were going to learn a general purpose lower level language today what would you go with?
Re: Modern C++ Programming Course
#149I've been setting up my little docker image that has both llvm/clang/tidy/clangd and gcc inside with boost with an idea I'd run it and from outside use it to code with live checking and compiling without littering my OS. Now, I feel like I'm doing something that already exists but couldn't really find what everyone use, ought of those that would prefer such a setup. Debugger within is probably a pipe dream, but who k…
Re: Modern C++ Programming Course
#150I've been setting up my little docker image that has both llvm/clang/tidy/clangd and gcc inside with boost with an idea I'd run it and from outside use it to code with live checking and compiling without littering my OS. Now, I feel like I'm doing something that already exists but couldn't really find what everyone use, ought of those that would prefer such a setup. Debugger within is probably a pipe dream, but who k…