I'm OK with Lisp output, but maybe that just shows how old I am. :-)
I wonder if it's possible (or wise) to have two different compilers for a language -- one that's optimized for such tight loops, and another that does thorough checking, etc. You know, kind of like -O, but at a much deeper level.
Anyway, I've played around with the idea a bit so far, and it seems that current agents/harnesses use way more tokens with that architecture.
See Workato, Bomi, LangFlow,...
The compiler is indeed not particularly speedy, but the reason you were given is not entirely accurate. As measured in this blog post [0] different parts of the compilation pipeline will take different amounts of time depending on what you're doing (cargo check vs. incremental build vs. full build, building a library vs. binary, etc.), but generally speaking type/borrow checking take up relatively small portions of compilation time (~15% or less, based on eyeballing the charts [1, 2]) compared to everything else.
> one that's optimized for such tight loops, and another that does thorough checking
I think that would risk producing diverging language subsets, especially if the checks are essential for language semantics. For example, what exactly does it mean if a program passes the "relaxed" compiler but fails the "thorough" one? How close does that actually get you to a "real" working program?
[0]: https://kobzol.github.io/rust/rustc/2024/03/15/rustc-what-ta...
[1]: https://kobzol.github.io/assets/posts/compile-sections/binar...
[2]: https://kobzol.github.io/assets/posts/compile-sections/libra...
I think "batteries included" is not a good thing to have in the future.
We'll want to be very explicit about what AI generated code can and can not do.
And so some form of effects based scripting language seems like a plausible choice: A language where by default "all batteries are removed".