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

>I also sometimes include log statements in specific error branches for debugging and delete them afterwards. That's trivially possible in the Go version but requires more effort in the shorter variants

You can just map your logging in between:

foo().map_err(|e| {log(e); e}).bar()



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: