Modernes C++

modernescpp.com · Personal blog · on HN since 2016

Rainer Grimm writes tutorials on modern C++, covering C++20 features, concurrency, the Core Guidelines, and upcoming standards.

What HN saysHN links it as a reference for C++ topics like thread-safe initialization, consteval, and coroutines.
35HN people shared it
14linked it in comments
116stories submitted
905story points
8 months agolast shared
2016people per year2026

Most-shared posts

  1. 1
    Reflection in C++26
    3 people · 5 points · first shared 2024 · discussion on HN
  2. 2
    C++ 20: The Core Language
    2 people · 283 points · first shared 2019 · 272 comments on HN
  3. 3
    C++20: Concepts, ranges, coroutines, modules
    2 people · 10 points · first shared 2019 · discussion on HN
  4. 4
    A Brief Overview of the PVS-Studio Static Code Analyzer
    2 people · 6 points · first shared 2019 · discussion on HN
  5. 5
    Dynamic and Static Polymorphism
    2 people · 5 points · first shared 2022 · discussion on HN
  6. 6
    Cooperative Interruption of a Thread in C++20: Callbacks
    2 people · 5 points · first shared 2024 · discussion on HN
  7. 7
  8. 8
    Partial Function Application
    2 people · 4 points · first shared 2023 · discussion on HN
  9. 9
    Calendar and Time-Zones in C++20: Time-Zones
    2 people · 4 points · first shared 2020 · discussion on HN
  10. 10
    My Serious Progressive Nerve Condition
    2 people · 3 points · first shared 2023 · 1 comments on HN
  11. 11
    No New New: Raw Pointers Removed from C++
    2 people · 1 points · first shared 2018 · 1 comments on HN
  12. 12
    Multithreading in modern C++
    1 people · 115 points · first shared 2016 · 39 comments on HN
  13. 13
    Latches in C++20
    1 people · 106 points · first shared 2021 · 83 comments on HN
  14. 14
  15. 15
    An Improved Thread with C++20
    1 people · 68 points · first shared 2021 · 66 comments on HN

What HN people wrote when they linked it

tradrich · 2022-09-28
How do HFT developers actually achieve single-digit microsecond latency? Why would you want to bypass the kernel? Can C++ model semantic categories as elegantly as Haskell? Can you actually get a job doing this stuff? We'll cover all this stuff next Tuesday 6pm UK time - that's 1pm US East. So bring your dinner (or lunch) and come ready with questions for Antony Peacock: senior developer in low latency trading and technical expert on the ISO C++ committee Rainer Grimm: Renowned C++ and Python trainer, author and mentor at Modernes C++[1] Richard Hickling: Trading and risk technology expert and Co-Founder at ProfitView[2] [1]: https://www.modernescpp.com/ [2]: https://profitview.net/
viraptor · 2018-03-26
Many. I like bashing C++ as much as the next dev, but modern C++ has nice type checks, interesting types/wrappers which help with common patterns (shared, unique ptrs, etc), and the compilers learned some great tricks which allow you to run memory safety checks yourself. (Asan and others) Also multithreading gets some improvements which will take more of the manual sync details away from the business logic. (http://www.modernescpp.com/index.php/multithreading-in-c-17-and-c-20) It's still delivered attached to a foot-gun, but you could do worse.
t0mpr1c3 · 2026-03-08
Meyer's implementation (with static block variable) is elegant and thread safe, and retains lazy initialization which can be important for the initialization order. https://www.modernescpp.com/index.php/thread-safe-initialization-of-da…
twic · 2022-12-30
> Are compilers required to evaluate constexpr expressions at compile time, where possible? No. But C++20 adds consteval, which does carry that requirement: https://www.modernescpp.com/index.php/c-20-consteval-and-constinit Well, sort of. It has to produce a constant expression, and in practice the way to do that is to evaluate it at compile-time. But under the as-if rule, a compiler can do what it likes, up to and including producing a binary containing your source code and a copy of gcc, and compiling your entire program when you run it.
jcelerier · 2021-03-10
> Note that C++ offers async as a library and not as a programming language feature which Bjarne Stroustrup is strongly against. https://www.modernescpp.com/index.php/c-20-coroutines-the-first-overvi…
dasloop · 2020-10-01
A good source of information for what is new in C++ versions: https://www.modernescpp.com/index.php/thebigfour That article covers the big four new features: - concepts - modules - coroutines - ranges library
in3d · 2020-09-12
>It seems that C++20's concepts are a viable candidate to compete with rust safety mechanism. No, that's not really something that concepts do. But there are ways of coding and tools using which you can get closer to Rust's safety features in C++. E.g. https://www.modernescpp.com/index.php/c-core-guidelines-lifetime-safet… or https://clang.llvm.org/docs/ThreadSafetyAnalysis.html.
mschuetz · 2018-09-21
> That's just a C# idiom Not just C#, Python and JS also have it already. And async-await is the first time ever where I've thought that yes, this is a good way to do single-threaded async (event-queue-ish) or even multi-threaded things. > Check POCO. Thanks for the hint, I will check it out. > but somehow you're complaining that C++'s interfaces require programmers to specify where the collections should start and finnish. Take a look at: http://www.modernescpp.com/index.php/higher-order-functions The c++ functions are unnecesarely verbose compared to other languages. This transform(vec.begin(), vec.end(), vec.begin(),[](int i){ return i*i; }); could be much more readable as vec.map([](int i){ return i*i; }); Also makes for-of the better choice in my opinion because if you're going to write more code, I'd rather write code that is readable.
cesarb · 2018-04-01
Having started using the Internet in the 90's, and thus still remembering Geocities-era websites, I loved that they did this as a webring (https://en.wikipedia.org/wiki/Webring): each blog post has a link to the next one, making a singly-linked circular list. Starting with this one, we have: - http://www.bfilipek.com/2018/04/deprecating-pointers.html - http://www.modernescpp.com/index.php/no-new-new - https://www.fluentcpp.com/2018/04/01/cpp-will-no-longer-have-pointers/ - https://blog.tartanllama.xyz/no-pointers/ - https://arne-mertz.de/2018/04/raw-pointers-are-gone/ And it circles back to this one.
jwilk · 2016-04-28
Apparently you can become famous by proof-reading this guy's articles: http://www.modernescpp.com/index.php/for-the-proofreaders-and-the-curi… oO
Certhas · 2016-04-28
That's intentional as it is a translation of a German blog: > Because the roots of my blogs are in German, I will continue to call him Modernes C++. That is not by mistake. http://www.modernescpp.com/index.php/warum-einen-blog-zu-modernem-c Not saying it's a good decision...
lioeters · 2020-03-15
> ..The node_modules package resolution algorithm is how JS does namespaces.. I wonder whether they got that right through sheer genius, or by accident. I recall hearing Ryan Dahl's regrets about design decisions in Node.js, a few of which had to do with the module/package resolution algorithm. 10 Things I Regret about Node.js - https://www.youtube.com/watch?v=M3BM9TB-8yA There are some good aspects of it though. I like how modules/packages are just imported objects (the path resolution is a bit weird and seemingly inefficient, i.e., checking every parent folder's node_modules folder). It goes together well, that modules are also self-contained function scopes by default (I suppose a kind of anonymous namespace), that exports a plain object with assigned properties. --- Wow, I just learned about C++20 Modules, looks like a game-changing feature. https://modernescpp.com/index.php/c-20-modules

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close