Hacker News new | ask | show | jobs
by xpressvideoz 1066 days ago
Reading the comments makes me feel bittersweet.

- Many people consider coroutines and green threads to be more or less the same thing, when they both have their pros and cons.

- The fact that the omission of iterators is even acceptable in the Go community saddens me. They seem to deliberately refuse any feature that might make the language even slightly more complex, in the name of simplicity. But hey, at least they retracted their opinion on generics.

I'm again reminded that Go is not my language.

5 comments

I use Go daily. honestly generics didn't change my code much at all.

I use them now somewhat, but only because they offer slightly better sugar at the call site. at the definition site, they are just as ugly as you expect, granted the Go syntax is about the best I have seen from other languages. so in the end I think we really lost some simplicity in order to silence the whining about no generics. not a good tradeoff.

I wouldn’t confuse HN with “the Go community”. The head of the Go team wrote this post. Will the coro package proposed in the post be added exactly as written? Maybe, but probably not exactly as written. Will something like it be added? I would be willing to bet money on it, yes. How long will it take? I’d say at least a year (release in Go 1.23 in August of 2024), maybe a little longer. I don’t think it could be much shorter though.
Given Go's history, there's a moderately high chance that this will be in a PR and immediately merged within the next few hours. They're a bit bipolar on "listen, wait, debate" vs "we just wrote about a new thing, it's already built and in stdlib but is largely undocumented"
I’ve never seen them do this. What are you talking about?
The whole Go module drama.
> But hey, at least they retracted their opinion on generics.

No, we really didn't.

Generics were acceptable to the community only because they are fully backwards compatible with existing code, and can be safely ignored if you don't need them.

Which, not at all surprising, is what most golang code still does. Because as it turns out, outside of "collections" of one sort or another, practical use cases for generics are not that easy to find. Most code written never gets to see more than one type to begin with, and more than 2 is already a stretch.

If anything, the addition of generics showcased to the larger community, how little many of the vaunted features!!!!! that people keep demanding and labeling as "essential" are actually needed for a widely accepted and excellent language.

Generics didn’t even change up 20% of my codebase and from that 20% there where libraries, am not sure if Go or C habits has hatched into me, but I see generics as another library that one programmer from somewhere just solved something
I would have expected that the Go community welcomes a uniform interface for iteration.