diff --git a/manuscript/markdown/mainmatter/1.objects/2.pojos.md b/manuscript/markdown/mainmatter/1.objects/2.pojos.md index d791dca..a76e33f 100644 --- a/manuscript/markdown/mainmatter/1.objects/2.pojos.md +++ b/manuscript/markdown/mainmatter/1.objects/2.pojos.md @@ -61,7 +61,7 @@ The prime purpose of a namespace is to provide disambiguation for a set of relat ### pojos as data structures -Namespaces are typically created statically and named. But objects need not by named, and they need not be static. Dictionaries can be used when we need a dynamic data structure that has arbitrary key-value pairs added and removed, and they can also be used to implement data structures (or parts of data structures) with named components. +Namespaces are typically created statically and named. But objects need not be named, and they need not be static. Dictionaries can be used when we need a dynamic data structure that has arbitrary key-value pairs added and removed, and they can also be used to implement data structures (or parts of data structures) with named components. Here're some functions that operate on a dictionary: @@ -92,4 +92,4 @@ function cons (value, list) { We're using a dictionary as an implementation technique, but we are really writing functions that operate on a tuple with elements named `_a` and `_d`. A lot of "objects" in JavaScript are data structures with named elements. They happened to be implemented with objects that act as dictionaries, but they aren't intended to be used as arbitrary key-value stores. -K> JavaScript objects are dictionaries. Dictionaries can be used to make data structures: The distinction is in how there are intended to be used. If an object is a container for arbitrary key-value pairs, it is a dictionary. If an object is a container for specific, named values, it's a custom data structure that is implemented with a dictionary. \ No newline at end of file +K> JavaScript objects are dictionaries. Dictionaries can be used to make data structures: The distinction is in how there are intended to be used. If an object is a container for arbitrary key-value pairs, it is a dictionary. If an object is a container for specific, named values, it's a custom data structure that is implemented with a dictionary.