Top all-time · #2135
Andrzej's C++ blog
Personal blog · akrzemi1.wordpress.comprogramming
Andrzej's C++ blog is a personal blog at akrzemi1.wordpress.com about programming. Since 2012, 35 different Hacker News readers have linked it 85 times, most often “C++: The Obvious Final Step”. It is still writing: the last post was on 2025-12-03, and you can follow it by feed.
Too few sampled comments (14) to say how often HN recommends it.?
Why HN links it
Andrzej Krzemieński's C++ posts on exceptions in destructors, type erasure, value semantics, noexcept and user-defined literals. HN commenters cite them in C++ discussions and recommend some as reading.
- Recommended for · 2 comments
- One commenter says to read the post explaining C++11 exceptions in destructors; another calls a type erasure article series nice.
Summarised by Claude from a sample of 14 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Guidelines and thoughts about C++
Most-linked posts?
- C++: The Obvious Final Step3 people · 4 mentions · first linked 2023-04-23
- [C++] Help the compiler warn you3 people · 3 mentions · first linked 2018-01-25
- Handling errors is canceling operations3 people · 3 mentions · first linked 2019-04-25
- C++’s best feature2 people · 2 mentions · first linked 2013-07-19
- /2012/02/03/value-semantics/2 people · 2 mentions · first linked 2015-07-20
- C++: Your own error condition2 people · 2 mentions · first linked 2017-08-12
- Using error codes effectively2 people · 2 mentions · first linked 2017-09-04
- Requires-Expression2 people · 2 mentions · first linked 2020-01-29
- Is constructible?2 people · 2 mentions · first linked 2016-08-29
- Your own type predicate2 people · 2 mentions · first linked 2017-12-02
What Hacker News says?
> WG21 seems to dearly wish this wasn't so, offering Concepts which pretend to semantics they don't have, such as std::totally_ordered and I'm glad to see your "CanBlah" concept doesn't do this, to be sure all things which match this requirement can, indeed blah() although we've no idea what that can or should do. I don't understand how random assumptions on what WG21 may or may not think counts as an example (or an…
Comment linking /2020/10/26/semantic-requirements-in-concepts/
on “Rust: A Critical Retrospective”Submitted A bug in GCC that may cause memory leaks in valid C++ programs as a story · 235 points
HN discussionWhen it comes to std::optional, the answer is no. In fact, std::optional<T&> is explicitly forbidden (see here: https://www.fluentcpp.com/2018/10/05/pros-cons-optional-refe... ) It is used in some other places though. For instance, std::string implementations typically employ small-string optimization (SSO) which means that there might be a limit on string::size() since some of the bits inside that value are used fo…
Comment linking /2014/04/14/common-optimizations/
on “Rust 1.50”Submitted A customizable C++ framework as a story · 55 points
HN discussionFastest to develop, yes. Portable, yes. Safest? Well, only in as much most of the errors will be blamed on the programmer for not doing the correct modern C++. I mean, seriously, understanding the borrow checker is nowhere near as hard as understanding this: https://akrzemi1.wordpress.com/2013/10/10/too-perfect-forwar... There's a No True Scotsman aspect to C++ advocacy. Anything that is obviously dumb either is bec…
Comment linking /2013/10/10/too-perfect-forwarding/
on “Why you should, actually, rewrite some of it in Rust”Submitted A clever comment style as a story · 5 points
HN discussionC++11 has user-defined literals: http://akrzemi1.wordpress.com/2012/08/12/user-defined-litera... http://en.wikipedia.org/wiki/C%2B%2B11#User-defined_literals
Comment linking /2012/08/12/user-defined-literals-part-i/
on “Revenge of the Types”Submitted The GCC bug affects you as a story · 4 points
HN discussionI kinda like the way Boost did error_code[1], which got incorporated into C++11[2]. Essentially you got a generic error_code struct which has two members, an int to hold a given error value or zero if there's no error, and a reference to an error category which helps interpret the error value. Effectively the error category is an interface, so in C terms it would be a reference to an error_category struct filled wit…
Comment linking /2017/10/14/error-codes-some-clarifications/
on “The case of the critical section that let multiple threads enter a block of code”Submitted C++ Concepts without Concepts as a story · 4 points
HN discussionRegarding Rust: > There is another thing I noticed, and I hope someone from the Rust community can correct me if I'm wrong, but it looks like Rust also special cased format_args! in the compiler by making it a built-in. If my understanding is correct, this would make Zig stand out as the only language of the three mentioned here which does not special case string formatting in the compiler and instead exposes enough…
Comment linking /2011/05/11/parsing-strings-at-compile-time-part-i/
on “Compile-Time Evaluation in the Zig System Programming Language”Submitted (Not) using std:thread (2012) as a story · 3 points
HN discussion"The rules for conditional operator are quite sophisticated and one of them says that if one of the sub-expressions is a throw expression, the type of the entire conditional operator is that of the other sub-expression." [1] [1] http://akrzemi1.wordpress.com/2011/05/06/compile-time-comput...
Comment linking /2011/05/06/compile-time-computations/
on “On the evolution of programming style: How far C++ has moved from its C roots”Submitted [C++] Help the compiler warn you as a story · 3 points
HN discussionWay more history than you asked for about how we got into this situation with noexcept: Up to 2011: https://akrzemi1.wordpress.com/2011/06/10/using-noexcept/ As of '17: https://devblogs.microsoft.com/oldnewthing/20180928-00/?p=99... (I think this is the final word; I don't see any changes to exceptions in high-level release notes for c++20 and c++23 -- did I miss anything?)
Comment linking /2011/06/10/using-noexcept/
on “Noexcept affects libstdc++’s unordered_set”Submitted The cost of std::initializer_list as a story · 3 points
HN discussionRead this: [1] In C++11, exceptions in destructors have defined semantics, but those semantics are very complicated. Prior to C++11, the semantics were not well defined. [1] https://akrzemi1.wordpress.com/2011/09/21/destructors-that-t...
Comment linking /2011/09/21/destructors-that-throw/
on “Oryol: A small, portable and extensible C++ 3D coding framework”Submitted C++’s best feature as a story · 3 points
HN discussionThis seems like a nice article series on the subject http://akrzemi1.wordpress.com/2013/11/18/type-erasure-part-i... Just getting started on it, it seems that the theme is that you can't have the same binary code work on different types without having a run-time indirection in there somewhere. But, you can use templates to keep that indirection convenient and type safe. And, you can structure your templates to only…
Comment linking /2013/11/18/type-erasure-part-i/
on “Template Metaprogramming with Modern C++: templates in depth”Submitted Class Invariants as a story · 2 points
HN discussionC++11 has some tricky changes which are way not obvious at the first glance. A few useful resources I found: * http://thbecker.net/articles/rvalue_references/section_01.ht... * https://en.wikipedia.org/wiki/Copy_elision * http://en.cppreference.com/w/cpp/language/eval_order * https://akrzemi1.wordpress.com * https://dl.dropboxusercontent.com/u/13100941/C%2B%2B11.pdf Understanding the combination of copy elision and…
Comment linking /
on “C++11/14 Idioms I Use Every Day”Submitted The Double Life of Objects as a story · 2 points
HN discussion> I give my brain a break by using std::unique_ptr<HugeObject>. Unfortunately this comes at a cost. Most notably, now you're unnecessarily stressing the allocator. But worse, you no longer enjoy the benefits of value semantics [1]. [1] https://akrzemi1.wordpress.com/2012/02/03/value-semantics/
Comment linking /2012/02/03/value-semantics/
on “C++: Return value optimization vs. std::move”Submitted C++: The Obvious Final Step as a story · 2 points
HN discussionAs someone who has deliberately avoided C++ for the last 20 years (in favour of functional programming) I find the discussions of "reference semantics" and "value semantics" (let alone "mutable value semantics") to be quite opaque. It is as if the C++ community has become an enclave of folks who put up with the extreme complexity of C++ and speak a correspondingly tortuous theoretical language. What the seem to be s…
Comment linking /2012/02/03/value-semantics/
on “Val, a high-level systems programming language”Submitted The Obvious Final Step as a story · 2 points
HN discussionA quick test-run on the pages linked from the hackernews front page: hackernews svg logo doesn't render youtube embed on the servo homepage doesn't load https://github.com/tpope/timl -> reloads/rerenders infinitely, uses 100% of 1 core https://akrzemi1.wordpress.com/2023/04/23/the-obvious-final-... -> hangs while loading the page, uses 100% of 1 core https://equalitytime.github.io/FlowersForTuring/ -> loads/renders…
Comment linking /2023/04/23/the-obvious-final-step/
on “Servo, the parallel browser engine written in Rust”Submitted Decent Concepts in C++ (2021) as a story · 2 points
HN discussionSubmitted Using Std:Chrono as a story · 2 points
HN discussionSubmitted Concept Archetypes as a story · 2 points
HN discussion