| ▲ | maleldil 3 hours ago | |||||||
But that's not the argument here. Python type hints allow checking correctness statically, which is what matters for agents. | ||||||||
| ▲ | simianwords 3 hours ago | parent | next [-] | |||||||
Yes then you might as well use some other language that uses types but also gets you performance. I agree the ecosystem is missing but hey we have LLMs now | ||||||||
| ||||||||
| ▲ | wincy 2 hours ago | parent | prev | next [-] | |||||||
That’s what makes types easier for me, too, so that makes sense. | ||||||||
| ▲ | 9rx 2 hours ago | parent | prev [-] | |||||||
> Python type hints allow checking correctness statically Not really. You can do some basic checking, like ensuring you don't pass a string into where an integer is expected, but your tests required to make sure that you're properly dealing with those integers (Python type hints aren't nearly capable enough to forgo that) would catch that anyway. The LLM doesn't care if the error comes from a type checker or test suite. When you get into real statically typed languages there isn't much consideration for Python. Perhaps you can prompt an LLM to build you an extractor, but otherwise, based on what already exists, your best bet is likely Lean extracted to C, imported as a Python module. Easier would be to cut Python out of the picture, though. If you are satisfied with the SMT middle-ground, Dafny does support Python as a target. But as the earlier commenter said: Types are best. | ||||||||