Comment by espeed
3 hours ago
can LLMs write better code if you keep asking them to “write better code”?
One of the keys for me was the use of types. Typestate when functions mint witnesses that can only come from it and are required to proceed and newtypes where you use custom types instead of strings so the agent can't forget. You can also use it to force the agent to use the implementation rather than reinvent the wheel by simulating linear types. Types are a much smaller target to optimize and provide constraints that fail loudly at compile time.
No comments yet
Contribute on Hacker News ↗