Re: Unsiged numbers (Was: RFC: Adding a Hashable type class and HashMap/HashSet data types to HP)

Daniel Peebles wrote:
I like this idea. As I mentioned on IRC, I'd call the class Hash rather than Hashable. I'm also with you on the Word return type. It may be less convenient but maybe this will be a tiny step towards the "great Word revolt" (in which all conceptually unsigned things in the prelude and standard libraries actually become unsigned) that I hope will occur sometime in the near future.
"Word" does not seem to be the right ... erm ... word. Modula is calling unsigned types CARDINAL. However in Modula-3 CARDINAL is a subset of INTEGER (similar to Haskell Int), in order to avoid problems with mixed signed/unsigned arithmetic. In the package non-negative I define non-negative numeric types, but I found it cumbersome to use them.
participants (1)
-
Henning Thielemann