Live data from Hacker News

Generics enabled by default in Go tip

go-review.googlesource.com

1–10 of 378 posts

Re: Generics enabled by default in Go tip

#6
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

Some related past threads:

Golang generics proposal has been accepted - https://news.ycombinator.com/item?id=26093778 - Feb 2021 (168 comments)

Go generics proposal moves to “likely accept” - https://news.ycombinator.com/item?id=26018649 - Feb 2021 (92 comments)

A Proposal for Adding Generics to Go - https://news.ycombinator.com/item?id=25750582 - Jan 2021 (270 comments)

The Next Step for Generics - https://news.ycombinator.com/item?id=23543131 - June 2020 (664 comments)

Generics in Go with Ian Lance Taylor (2019) - https://news.ycombinator.com/item?id=22361089 - Feb 2020 (98 comments)

Why Generics? - https://news.ycombinator.com/item?id=20576845 - July 2019 (254 comments)

Go's updated generic proposal (Contracts) - https://news.ycombinator.com/item?id=20541079 - July 2019 (61 comments)

Re: Generics enabled by default in Go tip

#8

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

Result[T] plus a ? operator to provide concision would be a huge win for Go.

Re: Generics enabled by default in Go tip

#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.

Re: Generics enabled by default in Go tip

#10

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

Result isn’t an enumeration of sorts?
Post reply on HN