|
|
|
|
|
by dallbee
2632 days ago
|
|
Like with all languages the implementer matters. There's a remarkable amount of variance that I've encountered in the tersiness of both Go and Java code. For example, Go's err != nil pattern is often cited as being ugly, but good go code will often remove errors by design. There's a good post by Dave Cheney about this; https://dave.cheney.net/2019/01/27/eliminate-error-handling-.... I think this is equally true of Java. Most Java code I've seen disgusts me, but I've also seen some beautifully written pieces. |
|
Another thing is that in many cases there is no good sentinel value to return that naturally leads to exit from loops or complex logic to check for error at the end of a function.