43 karma · joined March 24, 2017
Why would you need it to lock mutexes everywhere?
You're doing something wrong if it doesn't get cleaned up automatically.
I don't know what you're referring to. Any links?
This is probably what the author was looking for https://pkg.go.dev/golang.org/x/sync/semaphore
https://go.googlesource.com/proposal/+/master/design/go2draf...
Doesn't look like the proposal adds anything new.
Everyone is different, but Go 's concurrency model has been the easiest for me to reason about. And I've dealt with my fair share of "async/await".
I won't argue with you my use of the imperative mood as I'm not a native speaker. I'll take note of it.
Sad indeed.
It's so sad to see people pushing to radically alter a language that they will probably never use because it will never be suitable for their needs.
They might try to please different crowds with Go 2. At the end of the day, they might just loose everyone.
The point isn't that it can't be useful.
In the real world, the amount of code I'm forced to understand that uses overly complicated abstractions is the issue. I'm glad one language finally took the opposite direction.
> Thanks to panics, even in Go.
Fortunately, for some reason Go developers don't use panic like exceptions and recover them at library boundaries.
The fact that I don't even have to think if the function call I'm looking at can throw and if I should catch it or not outweighs everything.
It's amazing to see the language embraced that much for server side apps.
Your example intrigues me, isn't an interface enough?
Is what bother you that the return value won't be typed T but IIncrementable in go?
Who would have thought. Maybe a rewrite would have been more appropriate.