Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
What's the right hash table API? (brevzin.github.io)
9 points by ibobev on May 28, 2023 | hide | past | favorite | 1 comment


It's the wrong question?

This really simplifies down to the issues of how to deal with optional return types in general.

And the answer as far as I can tell is either use a language with adequate support for safe optionals or accept that whatever you do is going to be a compromise with a slightly sharp edge.

A list of length zero or one is sometimes a viable solution, but it's really just a hack sidestepping how long it took us to come up with a better solution than null.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: