3 ms·
I'm curious - what about it strikes you that way? To my eyes, starlark bears more resemblance to YAML, or TOML, or any other generic configuration language, th
by marssaxman 2y ago
I'm curious - what about it strikes you that way?
To my eyes, starlark bears more resemblance to YAML, or TOML, or any other generic configuration language, than to Python.
- laurentlb 2y agoYou've probably looked only at the Bazel BUILD files. They are indeed quite declarative (as the syntax is restricted even more). If you open other Starlark files that have functions (in Bazel, that would be in .bzl files), you should recognize the Python syntax (e.g. `def` statements + space indentation).
- IshKebab 2y agoErm what? It's very very obviously based on Python. The docs even explicitly say that. This is the example they give: def fizz_buzz(n): """Print Fizz Buzz numbers from 1 to n.""" for i in range(1, n + 1): s = "" if i % 3 == 0: s += "Fizz" if i % 5 == 0: s += "Buzz" print(s if s else i) fizz_buzz(20) Does that look like YAML or TOML?