I am experimenting with something I call "Typescript Ultra Strict". Basically, typescript with no nulls, no classes, no undefineds, no switch statements, and no vars + the addition of match macros.
Basically forcing AI to write functional AI code through compilation errors that is more deterministic and testable.
Back in 2008 Chrome built the V8 Javascript engine and the entire world built edge compute on top of this amazing primitive. However, Javascript had it's short comings so we made Typescript, but Typescript still was "too friendly", mainly to appeal to a human audience. We no longer have humans writing code, so why not give the AI something less clunky and more clanky 😉
UX
- write .tsus files
- add a one-line plugin to webpack, Vite, esbuild, or Bun
Features include:
- Option/Result runtime, with boundary helpers that turn the outside world's nulls and throws into Option and Result
- match macros
- good error messages, so an agent can fix its own errors in a loop