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 (8)

  1. I have started my own PL project after going through Crafting Interpreters.

    I know there is a ton of stuff I need and want to learn but no language has all the features I'd like.

    Namely systems language "zero overhead" performance, modern ergonomics and compile-time guarantees like Rust, dependent types (I don't know much about type systems so maybe there is - and probably there is - some good alternative I am missing), powerful generics (the shit people do with C++ templates often leave me admiring the creativity and also wondering why it has to be so unreadable), reflection, and more stuff I currently have as ideas but not in a very solid form admittedly. And all those working synergistically and coherently.

    I do have a good foundation in abstract math but there is lots to study for sure. And it has to be something that really offers some great combination of features otherwise it's not worth it for anything else than me learning how to write a proper compiler. There are too many languages already, but I am not sure whether this is because it is too hard of a problem or because of choices people made. I guess I am going to find out.

    At least my motivation is in a relatively sufferable shape despite it having tendencies of going down the shitter with all this vibe-coding crap going on.

    Replies (1)
    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...

              Continue this thread (1 replies) →