|
|
|
|
|
by ruricolist
4509 days ago
|
|
One could make the argument (I think so, at least) that if the number of associations you are dealing with is small enough to write out literally, then using a hash table is a mistake. It might be one of Common Lisp's strengths that is has ways to represent small tables efficiently and thus avoids the "hash addiction" that haunts languages where hash tables are used for everything. But even if a more compact way of constructing hash tables is called for, why a literal syntax instead of a more compact constructor? E.g. you could write (dict "name" "andrew" "location" "sf")
with a compiler macro that produces exactly the above code. |
|