Handling Failures as Values in Agent-Generated Code
说明与用途
Vow 是一种消除空值和异常的语言,使用 Result 值处理错误,提升 AI 代理的可靠性。
问题
AI coding agents often overlook failure paths in languages with nulls and implicit exceptions, leading to runtime crashes.
结果
In October 2026, Vow achieved 99.5% pass rate on fresh hidden tests versus 99.3% for TypeScript, with comparable performance on hard tasks. Runtime errors are formatted with actionable fixes, improving agent reliability.
工作流
- 1. Agent writes function returning Result.
- 2. Agent uses ? operator or match to handle Result.
- 3. If failure, Vow outputs detailed error with fix suggestion.
- 4. Agent can immediately apply fix without human intervention.
证据
AI coding agents such as Claude Code, Codex, and Cursor work in a continuous loop: write, run, read the error, fix.
Vow has no nulls and no exceptions.
In tests conducted in October 2026 with Claude Haiku 4.5, code that agents finish passes fresh hidden tests at 99.5% for Vow and 99.3% for TypeScript.
Every Vow error says what is wrong, where, and the likely fix.
The command vow --sandbox checks capabilities before anything runs and refuses a program that reaches beyond what you allow.
Vow compiles to JavaScript. Recursive fib(32) runs in 0.09 s, against 0.14 s for Python.
- 记录日期: 2026-11-02T18:28:44.814Z