Closed alandonovan closed 3 years ago
Hi Jon, Jay,
I have updated this change to the Go impl, and the spec change in https://github.com/bazelbuild/starlark/pull/161 to clean up the following primary parts of the problem:
The remaining parts of the problem are:
To make this process more manageable and reduce the number of rounds of review on an increasingly large pair of PRs, I propose that we aim to commit the spec change and the Go implementation once we are happy with the "phase 1" features, and then make follow-up changes to address the "phase 2" items. Given that no-one is yet using bytes, I don't think this will be disruptive.
cheers alan
PTAL; thanks.
This change defines a 'bytes' data type, an immutable string of bytes. In this Go implementation of Starlark, ordinary strings are also strings of bytes, so the behavior of the two is very similar. However, that is not required by the spec. Other implementations of Starlark, notably in Java, may use strings of UTF-16 codes for the ordinary string type, and thus need a distinct type for byte strings.