An unofficial, read-only Hacker News reader.

The need for a formally verifiable mainstream programming language (opens external site)

343 points by todsacerdoti 3 days ago | blainehansen.me | 321 comments on HN

View full thread · View on Hacker News

Comment thread (7)

  1. > wondering why it has to be so unreadable

    People pushing it beyond what it was originally designed for in C++98.

    Most of the template meta-programming tricks are hardly needed since C++20, and improved yet again in C++23, with C++26 static reflection making them completly not worthwhile pursuing, assuming they sort out the whole ratification drama.

    Replies (1)
    1. Yes, I am aware of those points. I follow the new C++ standards (haven't touched reflection though). The transformation of C++ since C++11 has been amazing and I think there is still no competitor for, say, numeric computation frameworks. But some stuff is still awkward to write and of course other features probably just can't make it to the language.
      Replies (1)
      1. You can play with reflection with the latest GCC on compiler explorer.

        The usual enum to string example, https://godbolt.org/z/aKc8Ebza4

        Replies (1)
        1. "template for" where one expects to see something with "switch/case" doesn't look obvious.

          And how to enable output of, so to say, "C-preprocessed" source?

          Replies (1)
          1. You embrace modern development tools, and use an IDE like Clion.

            https://blog.jetbrains.com/clion/2026/07/2026-2-release/#sup...

            Replies (1)
            1. Thanks for the hint, though I actually hoped for something lightweight like a compiler flag for C++ output or helpers for gdb/lldb. C macros might be evil, but at least they can be easy expanded to standard C.

              Continue this thread (1 replies) →