News for hackers. Stuff that matters.
Re:I Want Off Mr. Golang's Wild Ride by fhood on Friday February 28, 2020 @11:10AM (#22443745)
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".
Re:I Want Off Mr. Golang's Wild Ride by busterarm on Friday February 28, 2020 @11:44AM (#22444049)
There'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.

Re:I Want Off Mr. Golang's Wild Ride by physicles on Friday February 28, 2020 @09:33PM (#22448336)
I’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.
Re:I Want Off Mr. Golang's Wild Ride by nif2ee on Saturday February 29, 2020 @12:26AM (#22449063)
Golang 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.

Re:I Want Off Mr. Golang's Wild Ride by api on Monday March 02, 2020 @03:28PM (#22468559)
This 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.

Re:I Want Off Mr. Golang's Wild Ride by gameswithgo on Friday February 28, 2020 @11:15AM (#22443788)
option types are spreading pretty well these days. Zig, for instance, has them, even as a low level C replacement language.
Re:I Want Off Mr. Golang's Wild Ride by dualogy on Saturday February 29, 2020 @06:33AM (#22450104)
Even C itself has unions since forever. Optionals, enums, bools, err-or-result constructs are (highly ergonomic) sugars atop of unions.
Re:I Want Off Mr. Golang's Wild Ride by 0xdeadbeefbabe on Friday February 28, 2020 @01:06PM (#22444833)
Isn't that the standard library and not the language?
Re:I Want Off Mr. Golang's Wild Ride by Tyr42 on Friday February 28, 2020 @03:47PM (#22446211)
Go 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?
Re:I Want Off Mr. Golang's Wild Ride by 0xdeadbeefbabe on Friday February 28, 2020 @06:42PM (#22447470)
Oh I didn't know that. I thought anyone could modify the standard library. Do you mean syscall?
Re:I Want Off Mr. Golang's Wild Ride by throwaway894345 on Friday February 28, 2020 @01:17PM (#22444954)
> Code that is silently incorrect is an absolute disaster on an enterprise level.

Enterprise software is not well-known for its quality or correctness.

Re:I Want Off Mr. Golang's Wild Ride by ben509 on Friday February 28, 2020 @08:00PM (#22447871)
That'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.