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

when I think of rust I think of beauties like this,

self.last.as_ref().unwrap().borrow().next.as_ref().unwrap().clone()

I know it can be improved but that's what I think of



Without any context it’s impossible to tell if code needs to be that obtuse or if uou somehow built your way into a setup that you could’ve avoided. ;P


GP is suggesting that one typically finds oneself in such a situation with idiomatic code. Even if it can be avoided with some effort, it will all too easily not be avoided.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: