logoalt Hacker News

lucisferretoday at 5:58 PM1 replyview on HN

AI needs typing? Why? That seems counterintuitive to me.

I agree on ORMs, but that would apply with or without AI for me personally. ORMs and ActiveRecord are an obvious and well documented anti-pattern at this point in time.


Replies

zbentleytoday at 6:34 PM

AI can benefit significantly from type checking. This provides a minimal-setup-required feedback loop that it can use to address errors. User defined types are also a greppable “what do I need to look at in this codebase to implement feature X?” signal, and serve as a means of hinting what you want the AI to change without writing code (stub out some functions and/or refer to new nonexistent types rather than writing prose for some parts of your spec).