Hacker News new | ask | show | jobs
by pas 370 days ago
Global settings are easy to check and verify and modern frameworks handle it for you, because there's all these knobs. (I agree it's waaay too many, but that's because there's a runtime and on top of that there's a process manager, and on top of that there's nginx/apache or other reverse proxy.)

Sure, someone can write a Go library to wrap every low-level function to make sure there's some error handling, maybe with closures and generics it would be quite okay.

In Go if you don't see the error handled you know it's not handled anywhere else. Great? Well, sure .. um, maybe? After all if you want to handle it you need to add error handling there. Consequently your code now is 3x as many lines and ~66% of it is returning errors upward. It's the new Assembly.

(I don't think try-catch is good, I think that PHP's error handling is better despite try-catch.)

Porting to Go (for reliability or otherwise), why? There are other languages out there! Especially if you spent the last decade learning about compile-time checks.

I know that k8s (and tons of now-critical software) is written in Go, and it's not a pretty sight -- and instead of having better abstractions there's NASA-cargo-culting[0]. Linux is written in C. It does not make C a great choice for many reasons. (Go is definitely a better choice than C when it comes to memory safety for example, but I prefer Scala or Rust.)

Facebook added their own typing to PHP (and tellingly called it Hack, of course).

[0] https://github.com/kubernetes/kubernetes/blob/ec2e767e593953...