News for hackers. Stuff that matters.
Re:Scala isn't fun anymore by valenterry on Tuesday September 13, 2022 @09:08AM (#32823761)
Go fails at the error-handling and resource-safety part. The compiler does not cover you properly.
Re:Scala isn't fun anymore by cube2222 on Tuesday September 13, 2022 @09:15AM (#32823848)
The fact that the compiler doesn't cover that automatically doesn't mean Go fails at it, as it has very good primitives for handling them.

Error handling and deferring for resource closure work just fine.

Sure you could say "but the compiler doesn't guarantee it". But that's not much of a point if it's not a real problem in practice.

Re:Scala isn't fun anymore by valenterry on Tuesday September 13, 2022 @09:21AM (#32823909)
> The fact that the compiler doesn't cover that automatically doesn't mean Go fails at it

But that's exactly what OP was talking about. Maybe for you that doesn't mean Go fails here, but for (us) Scala developers it definitely feel like Go fails us. We want a language that fails at compiletime in as many cases as possible.

> But that's not much of a point if it's not a real problem in practice.

Maybe not for you. For me it is!

Re:Scala isn't fun anymore by cube2222 on Tuesday September 13, 2022 @09:27AM (#32823989)
I agree it's fine to have different taste, as I mentioned in another reply to you.

But it's the difference between whether this statement is objective, or subjective.

> is the best concurrency library on any platform

Re:Scala isn't fun anymore by valenterry on Tuesday September 13, 2022 @11:30AM (#32825593)
Fair enough, that sentence is a bit over the top. I personally agree, but it is subjective and sounds like a fact.
Re:Scala isn't fun anymore by closeparen on Tuesday September 13, 2022 @07:46PM (#32831566)
Not a real problem in practice is just another way of saying rare. But given enough scale and enough time, rare things do happen, and they cost inordinately more programmer effort to chase down. I actually don’t mind if the compiler lets me ship very dumb bugs: those will be auto-rolled back out of production in seconds. It’s the subtle stuff that kills me.
Re:Scala isn't fun anymore by kaba0 on Tuesday September 13, 2022 @10:56AM (#32825099)
Error handling and Go doesn’t mix well.
Re:Scala isn't fun anymore by cube2222 on Tuesday September 13, 2022 @11:21AM (#32825483)
That's a matter of opinion. Many, me included, very much like the current, very explicit, approach.

I understand why people who like monadic constructs don't like it though.

Re:Scala isn't fun anymore by seer-zig on Wednesday September 14, 2022 @03:20AM (#32834215)
Re:Scala isn't fun anymore by kaba0 on Tuesday September 13, 2022 @11:47AM (#32825856)
I don’t know — I don’t claim that algebraic datatypes are the only proper way to handle errors, I’m okay with exceptions as well (even checked ones). But what go has is only very slightly better than C’s attempt, so I’m not sure it is that subjective.
Re:Scala isn't fun anymore by cube2222 on Tuesday September 13, 2022 @01:18PM (#32827292)
I think the presence of multiple return values and the ability to easily use complex types for errors make a huge difference (adding wrapping messages, context, etc.).

I agree algebraic data types could improve this. I don't think monadic result types or exceptions would be an improvement.