Re:A case for Go as the best language for AI agents
by daxfohl on Monday March 02, 2026 @03:48PM
(#47223844)
How's the multicore and async story these days? I remember that was one of the big draws of F# originally, that it had all (or, most of) the type safety features of OCaml but all the mutlicore of dotnet. (Plus it created async before even C# had it). Has OCaml caught up?
Re:A case for Go as the best language for AI agents
by sweetsocks21 on Monday March 02, 2026 @04:00PM
(#47223990)
OCaml has full multicore support with algebraic effects now. The effect system makes things like async very nice as there's no function "coloring" problem: https://discuss.ocaml.org/t/ocaml-5-0-0-is-out/10974
But I don't believe the effects are tracked in the type system yet, but that's on it way.
Re:A case for Go as the best language for AI agents
by lambda_foo on Monday March 02, 2026 @04:45PM
(#47224590)
The type system for effects is an ongoing research effort. For now you get unhandled effect exceptions at runtime.
With Multicore OCaml we gained thread sanitizer support and a reasonable memory model. Combined they give you tools for reasoning about data races and finding them. https://ocaml.org/manual/5.3/tsan.html
Re:A case for Go as the best language for AI agents
by lambda_foo on Monday March 02, 2026 @04:42PM
(#47224562)
Strongly agree, plus OCaml has an expressive type system that lets you build abstractions that just aren’t possible with Go. The original article gives poor reasons for choosing Go.
Re:A case for Go as the best language for AI agents
by strongly-typed on Monday March 02, 2026 @05:52PM
(#47225357)
Strong agree. OCaml's compiler is sofa king good at catching and preventing real bugs that the agents accidentally introduce here and there. It's the same as with humans, except the agents don't complain about the bullshit reasons humans don't like OCaml. They just crank through and produce high quality output.
Re:A case for Go as the best language for AI agents
by CuriouslyC on Monday March 02, 2026 @06:27PM
(#47225768)
Seems like if you're in that boat you'd just want to go with F# though?
- Strongly typed, including GADTs and various flavors of polymorphism, but not as inscrutable as Haskell
- (Mostly) pure functions, but multiple imperative/OO escape hatches
- The base language is surprisingly simple
- Very fast to build/test (the bytecode target, at least)
- Can target WASM/JS
- All code in a file is always evaluated in order, which means it has to be defined in order. Circular dependencies between functions or types have to be explicitly called out, or build fails.
I should add, it's also very fun to work with as a human! Finding refactors with pure code that's this readable is a real joy.