Top all-time · #1063
Fluent C++
Personal blog · fluentcpp.comprogramming
Fluent C++ is a personal blog at fluentcpp.com about programming. Since 2016, 66 different Hacker News readers have linked it 181 times, most often “C++ Will No Longer Have Pointers”. The last post was in 2022, but the archive is still widely read.
Jonathan Boccara's blog
Most-linked posts?
- C++ Will No Longer Have Pointers5 people · 5 mentions · first linked 2018-04-01
- The Surprising Limitations of C++ Ranges Beyond Trivial Cases4 people · 4 mentions · first linked 2019-09-13
- Named Arguments in C++3 people · 3 mentions · first linked 2018-12-14
- Function poisoning in C++ with gcc3 people · 3 mentions · first linked 2018-09-04
- 10 Techniques That Will Make You Understand Other People’s Code Better3 people · 3 mentions · first linked 2018-06-05
- What Books to Read to Get Better in C++3 people · 3 mentions · first linked 2017-07-28
- Std::iterator is deprecated3 people · 3 mentions · first linked 2018-05-08
- How std::any Works2 people · 3 mentions · first linked 2021-02-05
- The Shapes of Code2 people · 3 mentions · first linked 2020-01-14
- Why Optional References Didn't Make It in C++17 – Fluent C++2 people · 2 mentions · first linked 2018-10-08
What Hacker News says?
So, I dug into this a bit more, and you're right! https://www.fluentcpp.com/2017/06/13/the-real-difference-bet... Maybe it was the era that I learned C++ (which was in the 98 days), but I was taught something closer to this convention, and didn't realize until just now there was such little difference by the book. Just bundling some data together? Use a struct. Doing more? Use a class. I still think this distinction…
Comment linking /2017/06/13/the-real-difference-between-struct-class/
on “Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust”Submitted Technical Debt Is Like a Tetris Game as a story · 256 points
HN discussionJulia Evans' blog is one of my favorites! It was a big inspiration for starting my own blog ( https://andythemoron.com ). I also love High Scalability and Dan Luu's blog which have been mentioned in other comments. I "follow" several which are mostly defunct, but in terms of blogs that still feature active updates: Evan Klitze's blog: lots of topics around Linux, C++, etc. https://eklitzke.org/ Sutter's Mill: lots o…
Comment linking /
on “Ask HN: What programming blogs do you follow?”Submitted Ways to Get Better at C++ as a story · 214 points
HN discussionThat’s actually what I do whenever I’m lacking humility as a coder. One F12 on std::iterator (which is now deprecated lol [0]) is enough for me to remember that I don’t know anything. [0] https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated...
Comment linking /2018/05/08/std-iterator-deprecated/
on “To learn a new language, read its standard library”Submitted The Evolutions of Lambdas in C++14, C++17 and C++20 as a story · 167 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 /2018/10/05/pros-cons-optional-references/
on “Rust 1.50”Submitted The Shapes of Code as a story · 144 points
HN discussionEDIT: Paste this hacky snippet into your browser's console to save all of the links into your clipboard: (() => { let result = [...document.querySelectorAll('td a')] .map((link) => link && !link.href.includes('ycombinator') && !link.href.includes('javascript:void') ? link.href : '' ) .filter(Boolean); result = [...new Set(result)]; result.sort(); copy(result.join('\n\n')); })(); Just to help, here's a compiled-list…
Comment linking /
on “Ask HN: Great Blogs by Programmers”Submitted On Design Patterns in C++ as a story · 79 points
HN discussionIf you're into C++, check out: https://www.fluentcpp.com/ It's a solid resource if you consider yourself a programming athlete. I won't shamelessly plug mine, as it doesn't fit this category yet (programming posts are the least ones I have by quantity), but looking forward to improve that.
Comment linking /
on “Ask HN: Great Blogs by Programmers”Submitted The Most Beautiful Piece of Code That Prints 42 as a story · 73 points
HN discussion> In C#, you create a class when it's an object, and a struct when it's a data structure, or am I missing something? Yes and no. Due to the technical limitation that (unlike in C++[0]) structs in C# cannot derive from other structs, DTOs in C# are often implemented (or rather: generated) as classes to allow derivation from a base class that has certain behavioral hooks (say, for misc. custom serializers). [0] See ht…
Comment linking /2017/06/13/the-real-difference-between-struct-class/
on “Classes vs. Data Structures”Submitted Modern C++: 7 Ways to Fake It Until You Have It as a story · 70 points
HN discussionFor dynamic languages sure. For strongly typed languages it's better to just use the type system to prevent those kind of things. C++ doesn't have great support here (lots of boilerplate needed) & usually people reach for Boost Units or Boost strong types but it's not that hard ( https://www.fluentcpp.com/2016/12/08/strong-types-for-strong... ). Mozilla is also exploring this specifically for coordinate spaces & wha…
Comment linking /2016/12/08/strong-types-for-strong-interfaces/
on “Modern C++ gamedev: thoughts and misconceptions”Submitted C++17 Features That Will Make Your Code Simpler as a story · 67 points
HN discussionThat's a nice idea. Also, while I love C++, I'm really frustrated that there are no native named arguments :( However, after your comment, I decided to spend a few minutes on the topic, and came up with these links: https://www.fluentcpp.com/2016/12/08/strong-types-for-strong... https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/ I am now looking forward to refactor some of our code base to make use of this. A…
Comment linking /2018/12/14/named-arguments-cpp/
on “Be wary of functions which take several parameters of the same type”Submitted How to Emulate the “super” Keyword in C++ as a story · 40 points
HN discussionI wrote something similar in C++, completely compile time that disappears at runtime: https://www.fluentcpp.com/2019/09/24/expressive-code-for-sta... Although the language itself doesn't guarantee that the value is not used again after a move, good static analyzers will provide a warning in that case, so it can still be safely used.
Comment linking /2019/09/24/expressive-code-for-state-machines-in-cpp/
on “Typestates in Rust (2018)”Submitted A Summary of the Metaclasses Proposal for C++ as a story · 40 points
HN discussionHaving 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.…
Comment linking /2018/04/01/cpp-will-no-longer-have-pointers/
on “Deprecating Raw Pointers in C++20”Submitted The C++ Metaclasses Proposal in Less Than 5 Minutes as a story · 28 points
HN discussionAnother blogger wrote about this : https://www.fluentcpp.com/2018/04/01/cpp-will-no-longer-have... Is this actually a joke ?
Comment linking /2018/04/01/cpp-will-no-longer-have-pointers/
on “Deprecating Raw Pointers in C++20”Submitted The Complete Guide to Building Strings in C++ as a story · 23 points
HN discussion> It's super common Curiously recurring, even! [0] Although what you're showing seems to be a variation on the curiously recurring template pattern, as the classes being mixed are listed 'symmetrically' without much regard for which will inherit from which. I found a blog post on 'mixin classes', which are like the CRTP but invert the inheritance relation. [1] What you've shown seems to be a third way. [0] https://e…
Comment linking /2017/12/12/mixin-classes-yang-crtp/
on “Goals and Priorities for C++”Submitted How C++17 Benefits from Boost Libraries as a story · 20 points
HN discussionMeta classes in 5 years? You're optimistic :) For those who don't know, there is a short video from fluentcpp: https://www.youtube.com/watch?v=v9eJE2m3CYk (and a transcript if you prefer: https://www.fluentcpp.com/2018/03/09/c-metaclasses-proposal-... ). And the proposal from Herb Sutter is here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p070...
Comment linking /2018/03/09/c-metaclasses-proposal-less-5-minutes/
on “C++ was the fastest growing programming language in Sept according to TIOBE”Submitted Runtime Polymorphism Without Objects or Virtual Functions as a story · 12 points
HN discussionConstexpr is not bad, but not macros. Macros can do things like generate new types, and add methods existing types. That's crucial for things like custom derive. C++ will get that sort of thing from the metaclasses proposal, which slouches towards WG21 to be born: https://www.fluentcpp.com/2017/08/04/metaclasses-cpp-summary...
Comment linking /2017/08/04/metaclasses-cpp-summary/
on ““I just started writing some Rust””Submitted TODO_BEFORE(): A Clean Codebase for 2019 as a story · 10 points
HN discussion