Live data from Hacker News

Go 1.20

blog.carlmjohnson.net

1–9 of 9 posts

Re: Go 1.20

#3
> new slice to array conversions

I expect this to bite a few people in places they didn't know could hurt. Better grep your code for slice-to-array conversion.

Re: Go 1.20

#4
post #3

> new slice to array conversions I expect this to bite a few people in places they didn't know could hurt. Better grep your code for slice-to-array conversion.

Note that afaik [3]string(s) was not valid before go1.20 so no existing code should use it. The semantic equivalent had to be written as *(*[3]string)(s) which also copies the array pointed to by *[3]string)(s). The new notation is basically a shorthand and easier to discover than using *(*[3]string)(s): https://github.com/golang/go/issues/46505

Re: Go 1.20

#5
post #4
post #3

> new slice to array conversions I expect this to bite a few people in places they didn't know could hurt. Better grep your code for slice-to-array conversion.

Note that afaik [3]string(s) was not valid before go1.20 so no existing code should use it. The semantic equivalent had to be written as *(*[3]string)(s) which also copies the array pointed to by *[3]string)(s). The new notation is basically a shorthand and easier to discover than using *(*[3]string)(s): https://github.com/golang/go/issues/46505

Right. It was not a well-formed conversion. My bad.

Re: Go 1.20

#6
Also particular note from the linked general release notes:

> Go 1.20 is the last release that will run on any release of Windows 7, 8, Server 2008 and Server 2012. Go 1.21 will require at least Windows 10 or Server 2016.

Windows 7 Extended Security Updates ending today expect to see that across a lot of software.

Re: Go 1.20

#9
post #8

Is it just me or go looks like more and more brainfuck language after each new version?

I feel the same... GoLang as a platform looks perfect, but syntax-wise it could be much simpler. I'm not sure why it is not, I think they try to differentiate from other languages, that's the only reason. Looks like C++ on steroids.