Why Associations are Magnitudes in Smalltalk? -
i haven't checked many dialects yet (in pharo association subclass of lookupkey, subclass of magnitude) presume common.
isn't definition counterintuitive? associations take part in unordered collections , don't think smalltalker ever takes account keys sent #<=. know whether inherited old implementations of smalltalk , never bothered challenge, or me missing something. bottomline: has ever used feature?
i don't think dictionary needs that; needs = , hash.
however, want list of associations , sort them later (eg. show them in sorted list). then, nice have order defined already.
and cost "<" method in association (or lookupkey, if superclass), comes free inheriting magnitude instead of object.
Comments
Post a Comment