summaryrefslogtreecommitdiff
path: root/chapter23
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2025-05-11 11:43:10 -0700
committerCliff Click <cliffc@acm.org>2025-05-11 11:43:10 -0700
commitef7577136b942819d4cff2f8c63605744e854f75 (patch)
tree5f75d92e208a1a8f696c0c175af135d8532d7c8b /chapter23
parentaeb86e64bdc72232b0cc7edd28e81344a7e1a3b4 (diff)
downloadSimple-ef7577136b942819d4cff2f8c63605744e854f75.tar.gz
Simple-ef7577136b942819d4cff2f8c63605744e854f75.zip
Clean up stacked mergemem
Diffstat (limited to 'chapter23')
-rw-r--r--chapter23/README.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/chapter23/README.md b/chapter23/README.md
index 433ecf03..5625fa61 100644
--- a/chapter23/README.md
+++ b/chapter23/README.md
@@ -12,8 +12,14 @@ You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linea
The idea is that structs have fields indexed by names, and arrays have fields
indexed by numbers, and these ideas are compatible with each other. This idea
-has been used by the C language for a long time - following a normal struct C
-allows an array and can index it with the usual array syntax.
+has been used by the C language for a long time - an array can follow a normal
+struct C and can index it with the usual array syntax.
+
+The alternative, using a field to hold a pointer to an array, exchanges some
+flexibility for an extra indirection. The obvious flexibility allows swapping
+the array out (generally for a larger one) and this is the basis of very common
+`Vector` or `ArrayList` generic containers.
+
```java
struct str {