Hacker News
new
past
comments
ask
show
jobs
points
by
eru
4 hours ago
|
comments
by
Sharlin
1 hours ago
|
next
[-]
Yes, too much Rust :D Eliding the `return` becomes so intuitive after a while that you sort of forget that most other languages require it.
reply
by
eru
33 minutes ago
|
parent
|
[-]
Haskell and the Lisps also work like this.
reply
by
andai
3 hours ago
|
prev
|
[-]
Re: missing return keyword
Actually, in Python, None is a valid key...
(I'm so sorry. JavaScript has ruined me.)
reply
by
tetha
3 hours ago
|
parent
|
next
[-]
Any `return c` for some constant is a valid and correct hash function. It just has a lot of collisions and degenerates hash-maps to terrible performance. That was in fact my first thought when I read "simplest hash functions".
reply
by
eru
1 hours ago
|
parent
|
prev
|
[-]
That's why I said "probably".
reply