Some thoughts on ReScript + AI, and what we're working on + looking at next. Making ReScript great for LLMs is already a priority, and will become even more so going forward.
And we think we're in a good position to make ReScript + AI a fantastic combo.
We're definitely already looking into this a lot for ReScript, with more to come as we release v12.
Some things in ReScript we've found works really well for AI (and that we can improve further):
- Nominal types means you can give great error messages
- Super fast toolchain gives fast feedback, so LLMs can "self heal" even if they aren't perfectly trained on the language
- The soundness (and preciseness) of the type system and the speed of the tooling means we'll be able to build lots of dedicated tooling for the LLM, like "find functions that take exactly this and do exactly this" (think hoogle for Haskell)
- Again, the soundness and speed means we can improve on things like Reanalyze. Reanalyze is a ReScript tool that does advanced whole-project statical analysis to find dead code (down to the field read/write level), ensure you've handled all exceptions that can happen, etc
- ReScript being a compiler means we can do optimizations like constant folding, emitting fast and efficient JS without the underlying ReScript looking terrible, etc
And perhaps most important, using LLMs to _build features in the ReScript compiler itself_ has gotten exceptionally good. I really mean exceptionally good. A bunch of us can now crank out new features and fixes in a way that's quality assured (we have loads of tests and various ways of writing tests to nail down behavior), at a pace that is just crazy compared to a year or so back.
We have tons of more thoughts around this of course. More to come soon hopefully!