4 ms·
> The eternal debate between dynamic and static type systems concerns the tradeoff between ease of prototyping and long term maintainability ... Unfortunately,
by seanwilson 2y ago
> The eternal debate between dynamic and static type systems concerns the tradeoff between ease of prototyping and long term maintainability ... Unfortunately, the training corpus highly emphasizes Python and JavaScript.
Anyone have experience here with how well strong static types help LLMs? You'd think it would be a great match, where the type errors give feedback to the LLM on what to fix. And the closer the types got to specifying the shape of the solution, the less guidance the LLM would need.
Would be interesting to see how well LLMs do at translating unit test examples and requirements in English into a set of types that describe the program specification, and then have the LLM generate the code from that. I haven't kept up here, but guessing this is really interesting for formal verification, where types can accurately capture complex specifications but can be challenging to write.
I find it quite sad that it's taken so long to get traction on using strong static types to eliminate whole classes of errors at the language level, and instead we're using super AI as a bandaid to churn out bug fixes and write tests in dynamically types languages for properties that static types would catch. Feels backwards.