aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralandonovan <adonovan@google.com>2020-11-11 15:47:07 -0500
committerGitHub <noreply@github.com>2020-11-11 15:47:07 -0500
commit3b0f582eefd16cc4686cb6cf82fed5bdea14fc33 (patch)
tree4691513ac583b1e93c03a54ea18e711f3d9b55d6
parent6905482ffb8d09e875d4e87f3290493251aa565e (diff)
downloadstarlark-go-3b0f582eefd16cc4686cb6cf82fed5bdea14fc33.tar.gz
spec: remove stale implementation notes (#315)
Updates https://github.com/bazelbuild/starlark/issues/20
-rw-r--r--doc/spec.md38
1 files changed, 1 insertions, 37 deletions
diff --git a/doc/spec.md b/doc/spec.md
index 0f3213b..0460285 100644
--- a/doc/spec.md
+++ b/doc/spec.md
@@ -571,14 +571,6 @@ non-zero.
int("ffff", 16) # 65535, 0xffff
```
-<b>Implementation note:</b>
-In the Go implementation of Starlark, integer representation and
-arithmetic is exact, motivated by the need for lossless manipulation
-of protocol messages which may contain signed and unsigned 64-bit
-integers.
-The Java implementation currently supports only signed 32-bit integers.
-
-
### Floating-point numbers
The Starlark floating-point data type represents an IEEE 754
@@ -624,15 +616,6 @@ float(3) / 2 # 1.5
3.0 // 2.0 # 1
```
-<b>Implementation note:</b>
-The Go implementation of Starlark supports floating-point numbers as an
-optional feature, motivated by the need for lossless manipulation of
-protocol messages.
-The `-float` flag enables support for floating-point literals,
-the `float` built-in function, and the real division operator `/`.
-The Java implementation does not yet support floating-point numbers.
-
-
### Strings
A string represents an immutable sequence of bytes.
@@ -1183,10 +1166,6 @@ A built-in function is a function or method implemented in Go by the interpreter
or the application into which the interpreter is embedded.
The [type](#type) of a built-in function is `"builtin_function_or_method"`.
-<b>Implementation note:</b>
-The Java implementation of `type(x)` returns `"function"` for all
-functions, whether built in or defined in Starlark,
-even though applications distinguish these two types.
A built-in function value used in a Boolean context is always considered true.
@@ -2619,9 +2598,6 @@ a, b = {"a": 1, "b": 2}
The same process for assigning a value to a target expression is used
in `for` loops and in comprehensions.
-<b>Implementation note:</b>
-In the Java implementation, targets cannot be dot expressions.
-
### Augmented assignments
@@ -3169,13 +3145,6 @@ if x is an `int`, the result is the nearest floating point value to x.
If x is a string, the string is interpreted as a floating-point literal.
With no arguments, `float()` returns `0.0`.
-<b>Implementation note:</b>
-Floating-point numbers are an optional feature.
-The Go implementation of Starlark requires the `-float` flag to
-enable support for floating-point literals, the `float` built-in
-function, and the real division operator `/`.
-The Java implementation does not yet support floating-point numbers.
-
### getattr
@@ -4272,10 +4241,7 @@ See [Starlark spec issue 20](https://github.com/bazelbuild/starlark/issues/20).
* Integers are represented with infinite precision.
* Integer arithmetic is exact.
-* Floating-point literals are supported (option: `-float`).
-* The `float` built-in function is provided (option: `-float`).
-* Real division using `float / float` is supported (option: `-float`).
-* String interpolation supports the `[ioxXeEfFgGc]` conversions.
+* String interpolation supports the `[ioxXc]` conversions.
* `def` statements may be nested (option: `-nesteddef`).
* `lambda` expressions are supported (option: `-lambda`).
* String elements are bytes.
@@ -4286,7 +4252,5 @@ See [Starlark spec issue 20](https://github.com/bazelbuild/starlark/issues/20).
* The `set` built-in function is provided (option: `-set`).
* `set & set` and `set | set` compute set intersection and union, respectively.
* `assert` is a valid identifier.
-* Dot expressions may appear on the left side of an assignment: `x.f = 1`.
-* `type(x)` returns `"builtin_function_or_method"` for built-in functions.
* `if`, `for`, and `while` are permitted at top level (option: `-globalreassign`).
* top-level rebindings are permitted (option: `-globalreassign`).