4 ms·
Not trying to bash, honestly curious; why not just use python?
by nhumrich 2y ago
Not trying to bash, honestly curious; why not just use python?
- dmlittle 2y agoThere's some explicit differences with Python[1]. My understanding is that Starlark was specifically created for Bazel so if I had to guess it's to enforce the immutability of values between contexts. [1] https://bazel.build/rules/language#differences_with_python https://bazel.build/rules/language#differences_with_python
- dilyevsky 2y agostarlark is easily embeddable, minimal, dependency-free language and python is none of those things
- rjst01 2y agoEmbedding the Starlark interpreter into a Rust program took me less than an hour. There's little more to it than adding the crate and calling into it. No futzing with the build process. If starlark does everything you need (and especially if its limitations are desirable for your use case) then it's the clear choice in my view.
- larsrc 2y agoThe early versions (before it was called Starlark) was indeed just run with a Python interpreter. But in order to have a deterministic and reproducible build, they needed to put some limits on what you can do, and especially what you can accidentally do. Starlark's raison d'etre is to allow a build graph that you can reason about and have a shared cache for.