Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are scenarios where retrieving the just-inserted value without first cloning it isn't possible. E.g.: when inserting a value into a non-empty hashset and then needing it again immediately.

But yeah... that's a bit of a contrived example and can be solved by a simple change to the insert function without specialised support from the language.






Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: