DEV Community

Discussion on: 10 Reasons NOT to use Go for your next project

 
valeriavg profile image
Valeria

Oh my, no this isn't an enjoyable debate.
Your claims are based on your subjective perception and, if I'm honest, quite disconnected from the reality.
Go promotes diversity and code sharing much better than a lot of languages. You can literally use any repo as a package. Therefore there isn't a monopoly over http like it is in case of Spring, but plenty of options, yet you are not obligated to use them.
Leave the comments, there was a lot of examples readers might find useful, which was ultimately the goal of the article.

Thread Thread
 
ecyrbe profile image
ecyrbe

I'm programming in rust nowadays and like Go, error handling is explicit.
Rust has syntactic sugar with the "?" keyword to forward errors and let the caller handle the error. Does Go have the same feature ?

Thread Thread
 
valeriavg profile image
Valeria

Nope, Go doesn't have that.

Both Rust and Go use the return value as an indicator of an error and enforces handling it on spot, but that is the only similarity.

Go's error interface is defined by the presence of an Error() string method and cannot do anything, but becoming a string.

Rust's Result has handy methods like unwrap or expect, along with the sugar.