diff --git a/docs/objects.md b/docs/objects.md index 9e556d1..9756106 100644 --- a/docs/objects.md +++ b/docs/objects.md @@ -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 diff --git a/docs/tutorial.md b/docs/tutorial.md index a652e83..26e4b85 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -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] diff --git a/runtime/vm_assignment_test.go b/runtime/vm_assignment_test.go index 2ec4201..a4a943c 100644 --- a/runtime/vm_assignment_test.go +++ b/runtime/vm_assignment_test.go @@ -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") diff --git a/runtime/vm_module_test.go b/runtime/vm_module_test.go index 84eaf06..65eb935 100644 --- a/runtime/vm_module_test.go +++ b/runtime/vm_module_test.go @@ -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]`, })