Skip to content
Browse files

fixed #71 - clarify Set usage advice

  • Loading branch information...
1 parent d348321 commit 058bc638042c89f46a6c3eed9ea12c5fae4863f1 Bozhidar Batsov committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 README.md
View
6 README.md
@@ -791,7 +791,6 @@ in *Ruby* now, not in *Python*.
## Collections
-* It's ok to use arrays as sets for a small number of elements.
* Prefer `%w` to the literal array syntax when you need an array of
strings.
@@ -810,7 +809,10 @@ strings.
arr[100] = 1 # now you have an array with lots of nils
```
-* Use `Set` instead of `Array` when dealing with lots of elements.
+* Use `Set` instead of `Array` when dealing with unique elements. `Set`
+ implements a collection of unordered values with no duplicates. This
+ is a hybrid of `Array`'s intuitive inter-operation facilities and
+ `Hash`'s fast lookup.
* Use symbols instead of strings as hash keys.
```Ruby

0 comments on commit 058bc63

Please sign in to comment.
Something went wrong with that request. Please try again.