I’ll play around with it some more and see if I can’t get some OOP pydantic-like stuff going with it. Otherwise it’s a non-starter.
https://github.com/yuin/gopher-lua
https://github.com/Shopify/go-lua
Unless you specifically need a JVM either of these will be a much more practical and mature choice for embedded scripting.
Alternatively if you prefer JS then Otto is a good choice: https://github.com/robertkrimen/otto
[1]: https://wazero.io/
(*) as long as there is a toolchain that supports using it on Wasm :P
We're using CUE to validate and transform data, as input to code gen, the basis for a DAG task engine, and more
https://cuelang.org | https://pkg.go.dev/cuelang.org/go@v0.6.0/cue | https://cuetorials.com/go-api (learn about CUE)
https://github.com/hofstadter-io/hof (where we are doing these things)
Generally, this subthread became several comments about using lang X in Go
If I want to script behavior, Lua is great. Python as well. But I’m not scripting behavior - I’m providing an engine.