minor doc update

1. composite types -> compound types (#128)
2. composite assignment -> compound assignment
This commit is contained in:
Daniel 2019-03-03 15:21:28 -08:00 committed by GitHub
parent 53ce12998e
commit 68cd38e49e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -57,7 +57,7 @@ Equals method should return true if the underlying value is considered to be equ
Copy() Object
```
Copy method should a _new_ copy of the same object. All primitive and composite value types implement this method to return a deep-copy of the value, which is recommended for other user types _(as `copy` builtin function uses this Copy method)_, but, it's not a strict requirement by the runtime.
Copy method should return a _new_ copy of the object. Builtin function `copy` uses this method to copy values. Default implementation of all runtime types return a deep-copy values, but, it's not a requirement by the runtime.
### Callable Interface

View file

@ -181,7 +181,7 @@ s = "foo" // ok: this is not mutating the value
// but updating reference 's' with another String value
```
The composite types (Array, Map) are mutable by default, but, you can make them immutable using `immutable` expression.
The compound types (Array, Map) are mutable by default, but, you can make them immutable using `immutable` expression.
```golang
a := [1, 2, 3]

View file

@ -47,7 +47,7 @@ func() {
expect(t, `a := 10; a /= 2;; out = a`, 5)
expect(t, `a := 10; a /= 5 - 3;; out = a`, 5)
// composite assignment operator does not define new variable
// compound assignment operator does not define new variable
expectError(t, `a += 4`, "unresolved reference")
expectError(t, `a -= 4`, "unresolved reference")
expectError(t, `a *= 4`, "unresolved reference")

View file

@ -76,7 +76,7 @@ func TestUserModules(t *testing.T) {
"mod1": `export "foo"`,
})
// export composite types
// export compound types
expectWithUserModules(t, `out = import("mod1")`, IARR{1, 2, 3}, map[string]string{
"mod1": `export [1, 2, 3]`,
})