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

Was about to write this exactly. Keep the lifecycle management in a dedicated component. Unsafe seems vastly overkill for dealing with this use case.

I'm even having a hard time seeing how this could be slower than any other alternative. Yes, in the places where creating / deleting is necessary, the "root" structure will have to be passed around, but in the worst case that has the cost of adding one argument to a function (which has the nice side effect of making the lifecycle _visible_).



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

Search: