An unofficial, read-only Hacker News reader.

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

343 points by todsacerdoti 2 days ago | blainehansen.me | 320 comments on HN

View full thread · View on Hacker News

Comment thread (2)

  1. Why?

    A type hint says "only accept things that look like this" and a compiling or a type checker can statically analyse the code to make sure that's valid everywhere. If you don't have that then the LLM would need to track back through the call tree to the originating point that defines the shape of the thing being passed to understand if it's valid all the way through the app in order to know that the data is correct. As it can't know where the originating call starts, it needs context of everything. It might only read the code it needs to read, and that can be done easily with an agent driving a small model, but it still needs complete access to every part of the app in order to trace what it needs to. With type hints it can just run the type checker to validate the code is OK and then trust the type hints.

    Replies (1)
    1. > If you don't have that

      Why wouldn't you have that? It is looking more and more likely that you accidentally replied to the wrong thread.