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

Why? Can you explicitly name a type of mistake that might happen and explain how Go solves it in a way that Rust does not?


It's not really a mistake. Just coding preference. For example: do_A()?.do_B()?.do_C()?. With the one line statement like that, when weird things show up, I don't really know if it's caused by bugs in do_A, do_B, or do_C. The linear layout of Go code lets me go through each do_X call line by line and setting break points is also easier. The problem here is when I need to investigate the chain do_A()?.do_B()?.do_C()?., I may have to rewrite that statement.


I agree that we should have good debugging tools for this (in particular, break on error return). But note that you can break on function calls and use "finish" to effectively go call by call to see where the error is today.


> use "finish" to effectively go call by call

Great tip. Thank you for the hint.




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

Search: