3 ms·
There aren't syntactic differences, syntactically starlark is a strict subset. But there are some semantic differences/weirdnessess. `load` does magic, so that
by joshuamorton 7y ago
There aren't syntactic differences, syntactically starlark is a strict subset. But there are some semantic differences/weirdnessess.
`load` does magic, so that `load('//path', 'name')` puts `name` into the file scope, which is possible in pure python but ewww.
Containers are immutable, so they can go in default values, which is good since a lot of bzl and BUILD relies on default arguments for brevity.
- __float 7y agoYep yep, makes sense. I helped migrate a Python monorepo to Bazel, which involved an unfortunate amount of Starlark :-) The mental lines between Starlark and Python are fully blurred at this point, but I've seen the "Starlark isn't Python" a few times this past week already. Thanks for the elaboration :)
- joshuamorton 7y ago(ask me how I know they're source compatible: https://github.com/bazelbuild/bazel-skylib/pull/91 https://github.com/bazelbuild/bazel-skylib/pull/91)