Live data from Hacker News

Generics enabled by default in Go tip

go-review.googlesource.com

11–20 of 378 posts

Re: Generics enabled by default in Go tip

#11
post #9

Not to be contrary for its sake, but I'll say this is one change I'm really not happy about. I feel like it's a change to placate many, while driving a lesser amount away. Which is fine, but still feels like the end of something, as I am one of the aforementioned 'lesser.' As for why...I love above most the simplicity and readability of Go. Any change which encroaches that, which this does, is a net negative to me.

I agree about placating. Go is fine as it is. I don't need or want generics, but the addition of generics won't stop me from using Go.

Re: Generics enabled by default in Go tip

#12
post #11
post #9

Not to be contrary for its sake, but I'll say this is one change I'm really not happy about. I feel like it's a change to placate many, while driving a lesser amount away. Which is fine, but still feels like the end of something, as I am one of the aforementioned 'lesser.' As for why...I love above most the simplicity and readability of Go. Any change which encroaches that, which this does, is a net negative to me.

I agree about placating. Go is fine as it is. I don't need or want generics, but the addition of generics won't stop me from using Go.

It might me, in time. As mentioned, my main interest in Go is in how easily I can read others code. This kinda ruins that, even if I never use it.

Re: Generics enabled by default in Go tip

#13
post #11
post #9

Not to be contrary for its sake, but I'll say this is one change I'm really not happy about. I feel like it's a change to placate many, while driving a lesser amount away. Which is fine, but still feels like the end of something, as I am one of the aforementioned 'lesser.' As for why...I love above most the simplicity and readability of Go. Any change which encroaches that, which this does, is a net negative to me.

I agree about placating. Go is fine as it is. I don't need or want generics, but the addition of generics won't stop me from using Go.

> I don't need or want generics

I do need and want generics. So... Whose needs and wants are more important?

Re: Generics enabled by default in Go tip

#14
post #11

Earlier quoted context omitted.

I agree about placating. Go is fine as it is. I don't need or want generics, but the addition of generics won't stop me from using Go.

> I don't need or want generics I do need and want generics. So... Whose needs and wants are more important?

Neither, of course. I'll leave so you can join. I don't think either of us is wrong.

Re: Generics enabled by default in Go tip

#15

Super excited for this. If you haven't checked out the latest proposal, here's an example of what Option/Result box types might look like (obviously not ready for release, just an experiment): https://go2goplay.golang.org/p/krvTH1_7lwX

> Viewing and/or sharing code snippets is not available in your country for legal reasons. This message might also appear if your country is misdetected. If you believe this is an error, please file an issue.

Wow, interesting. I'm in Japan.

Re: Generics enabled by default in Go tip

#16
post #2

Wow, it's happening! For others completely out of the loop on that there was even an accepted proposal that is now being implemented: https://go.dev/blog/generics-proposal

The full proposal is here:

https://go.googlesource.com/proposal/+/refs/heads/master/des...

Re: Generics enabled by default in Go tip

#17
post #9

Not to be contrary for its sake, but I'll say this is one change I'm really not happy about. I feel like it's a change to placate many, while driving a lesser amount away. Which is fine, but still feels like the end of something, as I am one of the aforementioned 'lesser.' As for why...I love above most the simplicity and readability of Go. Any change which encroaches that, which this does, is a net negative to me.

How would you write a singly linked list who’s contents are arbitrary? What if you were to map a function over it? Say you want to use this data structure with third-party objects? How do you do that right now?

Re: Generics enabled by default in Go tip

#18
post #9

Not to be contrary for its sake, but I'll say this is one change I'm really not happy about. I feel like it's a change to placate many, while driving a lesser amount away. Which is fine, but still feels like the end of something, as I am one of the aforementioned 'lesser.' As for why...I love above most the simplicity and readability of Go. Any change which encroaches that, which this does, is a net negative to me.

I personally think this will be a great thing for the quality of the language (no typed higher-order functions is a massive pain point as-is), but at the same time one could argue that this is an equally massive bait-and-switch for all the developers who prefer Go's original take on "simplicity".

Re: Generics enabled by default in Go tip

#19
post #11

Earlier quoted context omitted.

I agree about placating. Go is fine as it is. I don't need or want generics, but the addition of generics won't stop me from using Go.

It might me, in time. As mentioned, my main interest in Go is in how easily I can read others code. This kinda ruins that, even if I never use it.

Learning something is also an option.

Re: Generics enabled by default in Go tip

#20
post #9

Not to be contrary for its sake, but I'll say this is one change I'm really not happy about. I feel like it's a change to placate many, while driving a lesser amount away. Which is fine, but still feels like the end of something, as I am one of the aforementioned 'lesser.' As for why...I love above most the simplicity and readability of Go. Any change which encroaches that, which this does, is a net negative to me.

If anything generics will make go code simpler. No more copy pasting everywhere and the possibility of making useful collection methods like map, filter and reduce.
Post reply on HN