News for hackers. Stuff that matters.
Re:Go: What We Got Right, What We Got Wrong by hnarn on Thursday January 04, 2024 @06:37PM (#38873758)
Why shouldn’t it be?
Re:Go: What We Got Right, What We Got Wrong by wavemode on Thursday January 04, 2024 @07:13PM (#38874025)
I believe even the language's own designers would agree with that sentiment. There's just generally a lot of things about Go that are great for low-level microservices but not great for 1M+ line of code business applications maintained by large teams.

I can't speak for others, but personally if I'm writing software with complex business logic, I'd want null safety, better error handling, a richer type system, easier testing/mocking... I've also never liked that a panic in one goroutine crashes the whole application (you can recover if it's your own code, sure, but not if it happened in a goroutine launched by some library).

Re:Go: What We Got Right, What We Got Wrong by dx034 on Friday January 05, 2024 @03:56AM (#38877090)
I'd disagree with most of that, but the panic in goroutines really hits home. It's so annoying to remember implementing recover in every goroutine started to avoid crashing your application. I don't get why there's no global recover option that can recover from panic's in goroutines as well.
Re:Go: What We Got Right, What We Got Wrong by closeparen on Monday January 08, 2024 @12:01PM (#38914884)
Goroutines are expected to communicate on channels. If one goroutine simply vanishes, then its counterparties on any channels will deadlock - either waiting for messages that never come, or trying to send messages to it after channel buffers fill up.

Crash is significantly easier to detect and understand than deadlock.

Re:Go: What We Got Right, What We Got Wrong by eweise on Thursday January 04, 2024 @06:48PM (#38873850)
Too low level and lacks the power to cleanly model the business domain.
Re:Go: What We Got Right, What We Got Wrong by dharmab on Thursday January 04, 2024 @07:12PM (#38874018)
"Too low level" "lacks the power" - I don't understand what this means. What are things that are hard to do in Go business applications that other languages do better?
Re:Go: What We Got Right, What We Got Wrong by rowls66 on Thursday January 04, 2024 @08:18PM (#38874538)
Here is an example. Go let’s structs be passed by value or by reference. The programmer needs to decide, and that adds complexity that is largely irrelevant for modeling complex business logic. Java does not provide a choice, which keeps it simple.
Re:Go: What We Got Right, What We Got Wrong by Cthulhu_ on Monday January 08, 2024 @10:48AM (#38913665)
Simple, but with an inherent performance issue and GC load; note also that Java's Valhalla project adds value types with more stack based semantics, so there too you as a developer get a choice.
Re:Go: What We Got Right, What We Got Wrong by za3faran on Thursday January 04, 2024 @08:27PM (#38874598)
It lacks modeling capability that you'd find even in languages like Java and C#. Enums, records, pattern matching, switch expressions, and yes even inheritance where it makes sense.
Re:Go: What We Got Right, What We Got Wrong by shakow on Thursday January 04, 2024 @09:05PM (#38874856)
> What are things that are hard to do in Go business applications that other languages do better?

Streams, meta-programming, enums, ‶modern″ switches, generators, portable types in CGo, streamlined error handling, safer concurrency primitives, nil, partial struct initialization, ...

Re:Go: What We Got Right, What We Got Wrong by kaba0 on Friday January 05, 2024 @02:44PM (#38883799)
Lacks expressivity is likely what parent meant.
Re:Go: What We Got Right, What We Got Wrong by closeparen on Thursday January 04, 2024 @06:50PM (#38873867)
Go has pretty powerful composition, reuse, higher-order functions etc. for dealing with byte arrays and streams. Not so much for business domain entities.