Hacker News new | ask | show | jobs
by sam_on_the_web 1037 days ago
Have you had a look at Starlark? Its a python-like scripting language built specifically for embedding into applications. Originally it was written in Java to be used in Bazel but its been re-implemented in go and rust and has found use in a bunch of other places.

https://github.com/google/starlark-go

1 comments

Yeah, it’s cool but doesn’t fit my use case. I’m not scripting configuration. I’m scripting functionality. I need to be able to enforce interfaces and signatures easily all while having near-go-like performance.

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.

If you want near-go-like performance, Jacobin doesn't help you either.
I can handle <10 orders of magnitude performance loss, I can't handle 100+ as I get with Lua and other scripting engines in go.