diff --git a/examples/arrays/arrays.go b/examples/arrays/arrays.go index 54bff09..010a7e5 100644 --- a/examples/arrays/arrays.go +++ b/examples/arrays/arrays.go @@ -1,5 +1,7 @@ // In Go, an _array_ is a numbered sequence of elements of a -// specific length. +// specific length. In typical Go code, [slices](slices) are +// much more common; arrays are useful in some special +// scenarios. package main diff --git a/examples/arrays/arrays.hash b/examples/arrays/arrays.hash index c04751e..8e1c671 100644 --- a/examples/arrays/arrays.hash +++ b/examples/arrays/arrays.hash @@ -1,2 +1,2 @@ -e71f2d3763eb2950727faa39b90cf1bc037d85fa -TaahifSGSwU +e2bdc11af83f9c6964cfa0e06e4642943b3055ae +bBVikSoZ1Z7 diff --git a/examples/arrays/arrays.sh b/examples/arrays/arrays.sh index 61e3019..76c43f6 100644 --- a/examples/arrays/arrays.sh +++ b/examples/arrays/arrays.sh @@ -7,6 +7,3 @@ get: 100 len: 5 dcl: [1 2 3 4 5] 2d: [[0 1 2] [1 2 3]] - -# You'll see _slices_ much more often than arrays in -# typical Go. We'll look at slices next. diff --git a/examples/slices/slices.go b/examples/slices/slices.go index 914a327..c9335e1 100644 --- a/examples/slices/slices.go +++ b/examples/slices/slices.go @@ -1,5 +1,5 @@ -// _Slices_ are a key data type in Go, giving a more -// powerful interface to sequences than arrays. +// _Slices_ are an important data type in Go, giving +// a more powerful interface to sequences than arrays. package main diff --git a/examples/slices/slices.hash b/examples/slices/slices.hash index 24199a5..e23e052 100644 --- a/examples/slices/slices.hash +++ b/examples/slices/slices.hash @@ -1,2 +1,2 @@ -02c5330eb3ef32a88ca22a5adbded9bd356f89f3 -iLnoIEIxeQ1 +13835b88336e031808f2f3887cd43d0b9d85cad0 +76f4Jif5Z8o diff --git a/public/arrays b/public/arrays index 7a0b707..b333813 100644 --- a/public/arrays +++ b/public/arrays @@ -28,7 +28,9 @@
In Go, an array is a numbered sequence of elements of a -specific length.
+specific length. In typical Go code, slices are +much more common; arrays are useful in some special +scenarios.package main
fmt.Println
.
-
$ go run arrays.go
@@ -177,18 +179,6 @@ when printed with fmt.Println
.
You’ll see slices much more often than arrays in -typical Go. We’ll look at slices next.
- -