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

> thinking through edge cases is something that frequently consumes a lot more time than literally typing the code out.

Isn't this even worse in Rust?



In Rust the edge cases are often more apparent because you're often forced to at least acknowledge them. So while you do have to put thought into handling them, you don't have to spend much thought finding or worrying about missing them.


As a different way to express this:

Compared to Go, Rust makes many kinds of edge cases mechanically discoverable. You cannot forget them.

As in Go, you can of course handle them poorly, and sometimes this is an ergonomic win. E.g. it's basically always trivial to panic (same as missing some critical cases in Go) or return the wrong value (literally all other cases in Go).

The primary difference isn't how you handle them, it's if you are aware that there are edge cases. Go is extremely lax here.




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

Search: