vilterp / hobbes

an interpreted dynamic language. Philosophy: minimalist and sensible like Python, but everything's an object like Ruby and Smalltalk.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hashCode

vilterp opened this issue · comments

  • HbInt: new Integer(value).hashCode()
  • HbFloat: new Float(value).hashCode()
  • HbString: value.toString().hashCode()
  • HbBoolean: new Boolean([true or false]).hashCode()
  • default: id

dicts and sets will use this. I guess it doesn't have to be exposed in the language...

Float, Int, True, False, and Nil can just use the default (address) implementation because there are never two instances with the same value