2007-07-11 Stephen Compall * kernel/Dictionary.st: Explain that LookupTable is usually a better choice. * kernel/LookupTable.st: Expand the explanation of differences with Dictionary. --- orig/kernel/Dictionary.st +++ mod/kernel/Dictionary.st @@ -43,7 +43,12 @@ 'I implement a dictionary, which is an object that is indexed by unique objects (typcially instances of Symbol), and associates another object with that index. I use the equality operator = to determine -equality of indices.' ! +equality of indices. + +In almost all places where you would use a plain Dictionary, a +LookupTable would be more efficient; see LookupTable''s comment before +you use it. I do have a couple of special features that are useful in +certain special cases.' ! --- orig/kernel/LookupTable.st +++ mod/kernel/LookupTable.st @@ -39,10 +39,11 @@ ! LookupTable comment: -'I am similar to Dictionary, except that my representation is -different (more efficient, but not useful to store a variable -binding). I use the object equality comparison message #= -to determine equivalence of indices.' ! +'I am a more efficient variant of Dictionary that cannot be used as a +pool dictionary of variables, as I don''t use Associations to store +key-value pairs. I also cannot have nil as a key; if you need to be +able to store nil as a key, use Dictionary instead. I use the object +equality comparison message #= to determine equivalence of indices.' ! !LookupTable class methodsFor: 'instance creation'!