The list below summarizes features of the Go implementation that are known to differ from the Java implementation of Starlark used by Bazel. Some of these features may be controlled by global options to allow applications to mimic the Bazel dialect more closely. Our goal is eventually to eliminate all such differences on a case-by-case basis. See Starlark spec issue 20.
- Integers are represented with infinite precision.
- Integer arithmetic is exact.
- Floating-point literals are supported (option:
floatbuilt-in function is provided (option:
- Real division using
float / floatis supported (option:
- String interpolation supports the
defstatements may be nested (option:
lambdaexpressions are supported (option:
- String elements are bytes.
- Non-ASCII strings are encoded using UTF-8.
- Strings support octal and hex byte escapes.
- Strings have the additional methods
ordbuilt-in functions are supported.
setbuilt-in function is provided (option:
set & setand
set | setcompute set intersection and union, respectively.
assertis a valid identifier.
- Dot expressions may appear on the left side of an assignment:
x.f = 1.
"builtin_function_or_method"for built-in functions.
whileare permitted at top level (option:
- top-level rebindings are permitted (option: