Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    F

    Fluent C++

    fluentcpp.com · Personal blog · on HN since 2016

    Jonathan Boccara writes about C++, covering ranges, metaclasses, named arguments, code readability, and language changes.

    Visit blogHN submissions
    ProgrammingLanguages & Compilers
    What HN says

    Commenters recommend it as a solid C++ resource and link its posts on strong types and named arguments, which C++ lacks natively.

    Stats for nerds
    66HN people shared it
    162linked in comments
    1.6Kstory points
    Dec 2023last shared
    2017people per year2023

    Top posts on HN

    1. 1
      Technical Debt Is Like a Tetris Game
      2 people · 257 points · first shared 2020 · 118 comments on HN
    2. 2
      Ways to Get Better at C++
      1 person · 214 points · first shared 2017 · 172 comments on HN
    3. 3
      The Evolutions of Lambdas in C++14, C++17 and C++20
      1 person · 167 points · first shared 2021 · 73 comments on HN
    4. 4
      The Shapes of Code
      2 people · 151 points · first shared 2020 · 68 comments on HN
    5. 5
      On Design Patterns in C++
      2 people · 88 points · first shared 2020 · 67 comments on HN
    6. 6
      The Most Beautiful Piece of Code That Prints 42
      2 people · 75 points · first shared 2018 · 23 comments on HN
    7. 7
      Modern C++: 7 Ways to Fake It Until You Have It
      1 person · 70 points · first shared 2018 · 23 comments on HN
    8. 8
      C++17 Features That Will Make Your Code Simpler
      1 person · 67 points · first shared 2018 · 86 comments on HN
    9. 9
      A Summary of the Metaclasses Proposal for C++
      3 people · 41 points · first shared 2017 · 18 comments on HN
    10. 10
      How to Emulate the “super” Keyword in C++
      1 person · 40 points · first shared 2017 · 15 comments on HN

    What HN people wrote when they linked it

    • 0xmarcinJan 2023

      Seems to me that someone "stole" it from F#. F# probably also take this idea from some unknown (to me) language. Here a similar idea in C++ https://www.fluentcpp.com/2019/10/18/piping-to-and-from-a-stream/

      This is generally a weakness of text based programming languages, that you cannot easily express graph flows like:

      / B1 \
      A>-| | -> C
      \ B2 /

      |> operator only solves the problem for non-branched flows like A -> B -> C making them more readable by removing nested calls.

      In theory you can create something similar using JS OOP by attaching e.g. map/use(func) methods to every prototype:

      function use(func)
      { func(this); return this; }
      function map(func)
      { return func(this); }

      and then:

      (1).map(n => n+1)
      .use(console.log)
      .map(n => "n = " + n)
      .use(n => console.log("str = $n"));

      Introducing a new operator instead of a library is a huge effort. I don't think this proposal will succeed, especially that current custom operator support in JS is nil.

    • andythemoronJul 2017

      Julia 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 of "state of the world" for C++, but also context, history, etc. https://herbsutter.com/

      IT Hare: C++, game programming http://ithare.com/

      The Erlangelist: Erlang/Elixir http://theerlangelist.com/

      null program: lots of miscellaneous topics http://nullprogram.com/

      Fluent C++: the name speaks for itself http://www.fluentcpp.com/

      Another Programmer's Blog: Linux, C, C++, C#, MSSQL https://www.stev.org/

    • steveklabnikMar 2021

      So, I dug into this a bit more, and you're right!

      https://www.fluentcpp.com/2017/06/13/the-real-difference-between-struct-class/

      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 is useful overall, because there often is more of one in many languages, but I will be more precise when speaking about C++ specifically in the future. I would also still argue the same thing overall, that is, Rust does not have what C++ calls classes. Our structs are apparently even simpler than C++ structs.

    • _pmf_Jun 2019

      > 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 https://www.fluentcpp.com/2017/06/13/the-real-difference-between-struct-class/ (the real technical difference between struct and class in C++ is just that the default visibility modifier for a struct is public and the default visibility modifier for a class is private; both can use inheritance and have virtual methods)

    • lpapezFeb 2021

      When 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-references/)

      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 for different purposes (example: https://akrzemi1.wordpress.com/2014/04/14/common-optimizations/). The "niche" in this case is the realization that strings are unlikely to be exabytes in size, so there is no reason to always store zeros in high bits of _size.

    • cesarbApr 2018

      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.

    Related

    Herb Sutterherbsutter.com204 people

    Bjarne Stroustrup on Dennis Ritchie: They said it couldn't be done, & he did it

    Herb Sutter
    Personal · last shared 2026
    Arne Mertzarne-mertz.de26 people

    Modern C++ Features – std::optional

    Arne Mertz
    Personal · last shared 2024
    Andrzej's C++ blogakrzemi1.wordpress.com35 people

    A bug in GCC that may cause memory leaks in valid C++ programs

    Andrzej's C++ blog
    Personal · last shared 2025
    Bartek's Coding Blogbfilipek.com49 people

    Coding without Google

    Bartek's Coding Blog
    Personal · last shared 2021
    PVS-Studio Blogviva64.com135 people

    Criticizing the Rust Language, and Why C/C++ Will Never Die

    PVS-Studio Blog
    Company · last shared 2021
    Barry Revzinbrevzin.github.io31 people

    Comparisons in C++20

    Barry Revzin
    Personal · last shared 2026
    Modernes C++modernescpp.com35 people

    C++ 20: The Core Language

    Modernes C++
    Personal · last shared 2026
    John Regehrblog.regehr.org401 people

    Teaching C

    John Regehr
    Personal · last shared 2026