...

gpderetta

13248

Karma

2014-02-28

Created

Recent Activity

  • As someone that has been using C++ extensively for the last 25 years, each release has felt as an incremental improvement. Yes, there are big chunks in each release that are harder to learn, but usually a team can introduce them at their own pace.

    The fact that C++ is a very large and complex language and that makes it unapproachable is undeniable though, but I don't think the new releases make it significantly worse. If anything, I think that a some of the new stuff does ease the on-ramp a bit.

  • i.e.: https://en.wikipedia.org/wiki/Antimatter-catalyzed_nuclear_p..., although it doesn't really replace the primary, just decreases the required quantity.

  • As a non-native speaker, TIL.

    Then again, my brain tries to complete the sentence as "Atomic Test-and-Set".

  • I was referring to the Orthodox C++ article linked by parent. Of course format is an improvement on both printf and iostream.

  • The biggest issue with printf is that it is not extensible to user types.

    I also find it unreadable; beyond the trivial I always need to refer to the manual for the correct format string. In practice I tend to always put a placeholder and let clangd correct me with a fix-it.

    Except that often clangd gives up (when inside a template for example), and in a few cases I have even seen GCC fail to correctly check the format string and fail at runtime (don't remember the exact scenario).

    Speed is not an issue, any form of formatting and I/O is going to be too slow for the fast path and will be relegated to a background thread anyway.

    Debugging and complexity has not ben an issue with std::format so far (our migration from printf based logging has been very smooth). I will concede that I do also worry about the compile time cost.

HackerNews