Вы используете устаревший браузер. Этот и другие сайты могут отображаться в нём некорректно. Вам необходимо обновить браузер или попробовать использовать другой.
poor language design leads to nonsensical syntax like this
C-like:
result, err = somethingThatMightErrorOut()
if err != nil {
// ayo this an error?
// what kind of an error is this?
// boutta read the documentation ???
}
compare that to rust, for example
C-like:
result = something_that_might_throw().unwrap() // panic out
rust has the best error management yet (errors as values are just the greatest).
poor language design leads to nonsensical syntax like this
C-like:
result, err = somethingThatMightErrorOut()
if err != nil {
// ayo this an error?
// what kind of an error is this?
// boutta read the documentation ???
}
compare that to rust, for example
C-like:
result = something_that_might_throw().unwrap() // panic out
rust has the best error management yet (errors as values are just the greatest).
func Unwrap[T any](x T, err error) T {
if err != nil {
panic(err)
}
return x
}
This is not poor architecture, this is actually done to force devs to check for errors, instead of ignoring them, which means that developer is likely to catch an error and recover from it. If you will just unwrap everything in rust you will crash on every minor error (network errors, io errors, invalid input, etc.), which is opposite of "crash resistant".
Go and Rust have entirely different purposes (one is for designing fast, safe and lightweight multithreaded applications, another is for people with crab fetish), don't compare them...
still, "this is actually done to force devs to check for errors" - yeah, we call that error handling. Go's error handling is bad. That's probably the only reason why I'm not using it.