4 ms·
I surprises me that most people here aren't up in arms in agreement with this point. Code that is silently incorrect is an absolute disaster on an enterprise le
by fhood 7y ago
I surprises me that most people here aren't up in arms in agreement with this point. Code that is silently incorrect is an absolute disaster on an enterprise level. I spend a lot of time writing seemingly redundant double and triple error checking into my code, only to have the designers of the LANGUAGE say, "yeah, most filepaths are utf-8 so seems good enough to me".
- gameswithgo 7y agooption types are spreading pretty well these days. Zig, for instance, has them, even as a low level C replacement language.
- dualogy 7y agoEven C itself has unions since forever. Optionals, enums, bools, err-or-result constructs are (highly ergonomic) sugars atop of unions.
- busterarm 7y agoThere's a huge cult of Golang being the "one true way" right now and any logic that could potentially contradict that is going to cause folks to throw the blinders up. Your point about that being a disaster in enterprise is exactly correct and I have huge misgivings about these people above writing the large majority of our software architecture. This is after we switched to Go from Java where these same people did some of the same things. Lesson not learned.
- 0xdeadbeefbabe 7y agoIsn't that the standard library and not the language?
- Tyr42 7y agoGo the language lets the Go the standard library play with things that nothing else can. If you can't implement it yourself, is it really a library and not just part of the language runtime?
- 0xdeadbeefbabe 7y agoOh I didn't know that. I thought anyone could modify the standard library. Do you mean syscall?
- throwaway894345 7y ago> Code that is silently incorrect is an absolute disaster on an enterprise level. Enterprise software is not well-known for its quality or correctness.
- ben509 7y agoThat's a valid point. Enterprise software can be continually buggy and broken and still be commercially viable. So that things are silently wrong is not a disaster as much as it is a dumpster fire that corporations are happy to shovel cash into while a whole lot of people huddle around it for warmth.
- physicles 7y agoI’ve written go full-time for the last 3.5 years and it still amazes me that by default the linter doesn’t at least warn about unused/uncaptured return error values.
- nif2ee 7y agoGolang is such a joke of a language. The compiler won't even compile if there is an unused variable but won't warn you if there is an unchecked error! This language is meant to produce buggy incorrect code that can only be mitigated with writing excessive repetitive tests that have nothing to do with business logic itself. Golang is probably the biggest embarrassment of a modern programming language ever conceived. Again, if you don't believe me, just start writing your first Kubernetes controller.
- api 7y agoThis doesn't match my experience. Go apps tend to be extremely clean and reliable. It's of course possible to write crap code in Go, but you can write crap code in any language. The unused variable thing is mildly annoying but fits with the cleanliness philosophy. Not checking errors is very easily detected by a LINTer such as the one built into the JetBrains GoLand IDE. It highlights failure to check errors and requires that you explicitly ignore the error return with something like "_, foo = bar.baz()". Go is spectacularly productive when used properly. It's a very nice language.