3 ms·
Starlark is an extremely limited dialect of Python. It is intentionally not Turing complete, to prevent unbounded computation. I think the rationale for making
by sltkr 6y ago
Starlark is an extremely limited dialect of Python. It is intentionally not Turing complete, to prevent unbounded computation.
I think the rationale for making it syntactically similar to Python was: we want to add a macro processing language to our build system, and we want to support common features like integers, strings, arithmetic expressions, if-statements, for-loops, lists, tuples and dictionaries, so why not base our DSL off of Python that has all that stuff, so that people familiar with Python will have an easy time reading and writing it?
Then they implemented a very limited but very fast interpreter that supports just the non-Turing-complete DSL.