[go-nuts] Re: The core type definition might be not right

2022-03-03 Thread 'gri' via golang-nuts
Thanks for bringing this up. It's a fair point. Note though that it won't be possible to instantiate foo because there's no type argument that would implement C; so it's not possible to get to an incorrectly running program here. We also don't report an error when a type set is empty. But you ar

[go-nuts] [security] Go 1.17.8 and Go 1.16.15 are released

2022-03-03 Thread Carlos Amedee
Hello gophers, We have just released Go versions 1.17.8 and 1.16.15, minor point releases. These minor releases include a security fix following the security policy: - regexp: stack exhaustion compiling deeply nested expressions On 64-bit platforms, an extremely deeply nested expressio

[go-nuts] The core type definition might be not right

2022-03-03 Thread tapi...@gmail.com
The tip spec states that the core type of a constraint is born from the type set of the constraint. https://tip.golang.org/ref/spec#Core_types So the C constraint in the following program should have no core type, because its type set is blank. But the foo function compiles okay, which indicates

Re: [go-nuts] Improving on unit test styles

2022-03-03 Thread twp...@gmail.com
To identify failing test cases in a table of tests where you don't have individual names you can use its index: for i, testCase := range testCases { t.Run(strconv.Itoa(i), func(t *testing.T) { // ... For debugging an individual test case, just skip over all but the failin

[go-nuts] Re: I just published : Iterator lib for Go: Library providing Map(), Filter(), Reduce() for Go

2022-03-03 Thread Samuel Berthe
Go will have support for generics soon. You won't need reflection anymore. \o/ https://github.com/samber/lo On Friday, September 3, 2021 at 3:53:45 PM UTC+2 Howard C. Shaw III wrote: > Just so you are aware of what's out there: > > https://github.com/robpike/filter > > "I wanted to see how hard

[go-nuts] Re: How long does a goroutine could run successively before being preempted? 10ms or 20ms?

2022-03-03 Thread Hans Allen
Just for curiosity, why 10ms? Author told a answer. See https://go-review.googlesource.com/c/go/+/8838/. On Wednesday, March 2, 2022 at 11:46:20 PM UTC+8 Hans Allen wrote: > > It seems 10ms. > > Introduced originally in go1.2 > See https://codereview.appspot.com/10796043. > > On Monday, February