Earlier quoted context omitted.
effective c++ is a bit out of date but still very good. i read it while learning c++ 'properly' last year and found it very helpful, but it helps to have some knowledge of modern c++ to know what is still relevant. there isn't much overlap with effective modern c++.
I don’t think he’s talking about the old effective C++ book, but rather the “effective modern C++” book as stated in the post.
Ask HN: Who is using C++ as the main language for new project?
171–180 of 199 posts
Re: Ask HN: Who is using C++ as the main language for new project?
#172Earlier quoted context omitted.
I don’t think he’s talking about the old effective C++ book, but rather the “effective modern C++” book as stated in the post.
I think I got the right one. https://www.amazon.com/Effective-Modern-Specific-Ways-Improv... Was printed in 2014. The older one which is `effective C++` is printed in 2005.
Re: Ask HN: Who is using C++ as the main language for new project?
#173I always wanted to learn C++ and never got the chance to use it for work, so I started reading the most significant books and resources suggested by [0], including learning how modern projects do things - on this, Jason Turner's template comes handy.
In the beginning it was tough, and at times it still is, however I am getting more and more familiar with the way things are done.
At first I chose Meson for "simplicity" but it took me a while to realise that Cmake is actually pretty easy as well, so I switched to Cmake and started using Conan.
My project setup is slowly converging to [1] - I couldn't just use it without having any knowledge about c++.
I am happy that someone packaged a lot of good and modern practices in such a repo. (I know they are good because the approach is quite common with other languages/technologies too).
There is way more to learn than with other languages, but it's interesting. Plus, i watched one or two videos from the creator of the language, and I like his philosophy of "freedom", which I believe is one of the main issues nowadays with c++, as most developers just want a prepackaged set of tools and APIs to develop and deliver fast, without thinking too much - c++ clearly doesn't get along with this type of developer.
The project consists of:
- C++20 with Clang - clang-format - clang-tidy - project_options with dev mode and other sanitizers on - Cmake/ninja - Conan - lots of nice things provided by the
- catch2 - qt6 - TOML for internal configuration - Sqlite3 for DB
- github/actions for CI/CD
I still haven't use Valgrind, still an amateur afterall:)
[0]: https://github.com/rigtorp/awesome-modern-cpp [1]: https://github.com/cpp-best-practices/gui_starter_template
Re: Ask HN: Who is using C++ as the main language for new project?
#174Usually combined with some sort of visual scripting for the higher level logic
Re: Ask HN: Who is using C++ as the main language for new project?
#175It's probably not ready for use yet, but give it six months or so: https://github.com/eightbrains/uitk
Re: Ask HN: Who is using C++ as the main language for new project?
#176Re: Ask HN: Who is using C++ as the main language for new project?
#177I almost exclusively use C++ for my projects. Especially modern C++. When it makes sense(especially for dev tools), I use Python since for those I'm not so worried about distribution and long-term robustness. Anyway here they are: Qt desktop app written in C++: https://github.com/thebigG/Tasker Simple GPIO front-end for linux GPIO driver(could definitely use some improvement) written in C++ and uses boost: https://gi…
What’s your preferred dependency management strategy?
Re: Ask HN: Who is using C++ as the main language for new project?
#178Earlier quoted context omitted.
You'll just do a clone in Rust in a year or so, if the C++ version turns out to be useful :-)
Exactly, and the Rust version will "mysteriously" turn out to have fewer security vulnerabilities, scale beyond 1 CPU core, and have a nicer CLI interface :-)
Re: Ask HN: Who is using C++ as the main language for new project?
#179Earlier quoted context omitted.
Came here to write pretty much exactly what you said. I'm using ESP32-S3 chips in a project. Rust support is really nascent and I can't afford to burn too much time on fixing tooling & recreating libraries. Though it does sound kinda fun. But I imagine there's a chicken/egg challenge where it's hard to see Rust on embedded platforms get more mature unless it gets more adoption and it's hard to imagine a significant u…
> Modern C++ is getting a little better all the time. Honestly, this is the reason I haven't moved anything to Rust, despite seriously considering it in the past. I would ditch C++03 in a heartbeat, but C++14 and beyond are very usable. C++ could certainly be better - I'm hopeful about Carbon - but it's good enough and improving fast enough that if you're already a C++ expert, I think you're pretty happy.
(Bonus points: Declare a static constexpr value in a compilation unit... and use it somewhere at runtime to get the moral equivalent of consteval for the values you care about.)