First class modules avoid some of the problems with protocols/typeclasses but it seems like it would be more verbose in many cases - what is the state of the art here?
-
-
In Swift we use conformances as part of the key for parameterizing types, so you’d get different hash table types if they grabbed different hashing implementations
-
We thought about doing something like that but decided against it because it seemed like it would have unknown ramifications. Figured it was better the devil you know (typeclasses)
- 1 more reply
New conversation -
-
-
(Namely, the issue was “how you do you ensure that every module that might use a hash table uses the same Hashable instance as the module that populated the table”)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.