Top all-time · #2372
Barry’s C++ Blog
Personal blog · brevzin.github.ioprogramming
Barry’s C++ Blog is a personal blog at brevzin.github.io about programming. Since 2019, 31 different Hacker News readers have linked it 63 times, most often “Rust vs. C++ Formatting”. It is still writing: the last post was on 2026-10-14, and you can follow it by feed.
A collection of articles about a variety of C++ topics.
Most-linked posts?
- Rust vs. C++ Formatting6 people · 6 mentions · first linked 2023-01-03
- Implementing a Struct of Arrays5 people · 5 mentions · first linked 2025-05-05
- Reflecting JSON into C++ Objects4 people · 4 mentions · first linked 2025-06-26
- What's so hard about constexpr allocation?3 people · 3 mentions · first linked 2024-07-24
- The Ignorability of Attributes in C++3 people · 3 mentions · first linked 2025-03-25
- The constexpr array size problem2 people · 2 mentions · first linked 2022-11-02
- C++ : if constexpr isn't broken2 people · 2 mentions · first linked 2019-01-15
- Projections Are Function Adaptors2 people · 2 mentions · first linked 2022-02-13
- Code Generation in Rust vs. C++262 people · 2 mentions · first linked 2024-09-30
- Implementing a Better views::split2 people · 2 mentions · first linked 2020-07-17
What Hacker News says?
It seems that C++ is moving in a full speed following trail-blazed by D language than Bjarne will care to admit: https://brevzin.github.io/c++/2019/01/15/if-constexpr-isnt-b...
Comment linking /c++/2019/01/15/if-constexpr-isnt-broken/
on “C++20 Oxymoron: Constexpr Virtual”Submitted Comparisons in C++20 as a story · 183 points
HN discussionFor what it’s worth, a common example of the capabilities of c++26 reflection is exactly this use case. I can’t remember where I first saw it, but this article [0] showcases the technique pretty well. It’s opt-in so not the compiler optimization that you’re imagining but still neat that it’s possible [0] https://brevzin.github.io/c++/2025/05/02/soa/
Comment linking /c++/2025/05/02/soa/
on “Every Byte Matters”Submitted Code Generation in Rust vs. C++26 as a story · 130 points
HN discussionBarry Revzin's comparison to what Rust chose here is interesting https://brevzin.github.io/c++/2023/01/02/rust-cpp-format/ I think Barry under-estimates how long it will be before C++ programmers actually get the equivalent of #[derive(Debug)] and as a result the impact on ergonomics. But of course I might be wrong.
Comment linking /c++/2023/01/02/rust-cpp-format/
on “C++23: The Next C++ Standard”Submitted Implementing a Struct of Arrays as a story · 126 points
HN discussionDo you think so ? Maybe I've been immersed in Rust for too long but it doesn't seem difficult to read to me. Here's Barry Revzin, a C++ programmer, explaining what he wants with a Rust example https://brevzin.github.io/c++/2020/12/01/tag-invoke/#this-is... Now like I said, I'm a Rust programmer, so of course I understand PartialEq's definition there, but, is it really hard to see what's going on as a C programmer? T…
Comment linking /c++/2020/12/01/tag-invoke/
on “C++ Papercuts”Submitted T* makes for a poor optional<T&> as a story · 87 points
HN discussion> What do more experienced people here think of that? "Experienced" person here. I've done a parser generator grammar or two. I've implemented several parsers. I mostly agree, but it depends on your use case. Most people writing parsers are doing so for a bespoke language, usually for config of an internal-use-only program or something like that. Such parsers won't be great, but they will work for people that: 1. Kn…
Comment linking /c++/2023/01/02/rust-cpp-format/
on “We Need to Know LR and Recursive Descent Parsing Techniques”Submitted What's so hard about constexpr allocation? as a story · 82 points
HN discussionSubmitted C++ : if constexpr isn't broken as a story · 74 points
HN discussionSubmitted Using Token Sequences to Iterate Ranges as a story · 29 points
HN discussionSubmitted Declaratively implementing CPOs (customization point objects) as a story · 27 points
HN discussionSubmitted Type-based vs. Value-based Reflection as a story · 23 points
HN discussionSubmitted Reflecting JSON into C++ Objects as a story · 21 points
HN discussionSubmitted Copy-on-Write with Deducing This as a story · 18 points
HN discussionSubmitted The Ignorability of Attributes in C++ as a story · 10 points
HN discussionSubmitted Implementing a Struct of Arrays as a story · 6 points
HN discussionSubmitted Code Generation in Rust vs. C++26 as a story · 4 points
HN discussionSubmitted C++: Assignment for Optional as a story · 4 points
HN discussionSubmitted Reflecting JSON into C++ Objects as a story · 3 points
HN discussionSubmitted Reflecting JSON into C++ Objects at compile time as a story · 3 points
HN discussionSubmitted Struct of Arrays with C++ Reflection as a story · 3 points
HN discussionSubmitted Implementing a Struct of Arrays Using C++26 Reflection as a story · 3 points
HN discussionSubmitted Polymorphic, Defaulted Equality as a story · 3 points
HN discussionSubmitted What's so hard about class types as non-type template parameters? as a story · 3 points
HN discussionSubmitted Generating Operator Functions as a story · 2 points
HN discussionSubmitted Reflecting JSON into C++ Objects as a story · 2 points
HN discussionSubmitted C++: Polymorphic, Defaulted Equality as a story · 2 points
HN discussionSubmitted Rust vs. C++ Formatting as a story · 2 points
HN discussion