On Fri, Aug 26, 2022 at 12:42 AM Frank Schröder
wrote:
>
> Thank you. Are there plans to add a type constraint which would allow this?
> Maybe something like this?
>
> func slice[From implements To, To any](from []From) []To { ... }
There are no plans for this at present. Sorry.
Ian
> On Wed
Hi Diana,
I found this question interesting, and so wanted to share some code
pointers.
First, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 is included in the list of
ciphers returned by crypto/tls.InsecureCipherSuites():
https://github.com/golang/go/blob/3d6ba27f4ffef372d9a41bc488ca329c2786187f/src/cry
Hi there,
I agree with Holloway here, and raise a very specific point. If the
poster's fear is with a new language bringing additional polymorphism to
malware, I would say there are *far* easier ways to permute a binary and
thus make it resistant to either reversing or signature based detection.
P
Given that Lucky 13 and other CBC attacks are more real (common,
practical), Go's decision to lower their priority didn't seem unreasonable.
Collapsing a multi dimensional protocol into an ordering requires some
value judgement on how heavily to weigh each component, there isn't a
single correct a
Perhaps it will have a small benefit. However, according to the benchmark,
the performance is slightly better in the case where there is 1 alloc/op,
Normally people avoid the heap allocation for better performance and there
is no evidence of that here.
On Fri, Aug 26, 2022 at 3:32 AM Lee Chou wr
I guess this defeats what you were trying to accomplish, but does this
answer your needs? https://play.golang.com/p/5kPX8F_u24l
Cheers,
On Fri, Aug 26, 2022 at 9:42 AM Frank Schröder
wrote:
> Thank you. Are there plans to add a type constraint which would allow
> this? Maybe something like this
I have some golang code like this:
```golang
type C [2]int
//go:noinline
func t1(a, b C) C {
var ret C
for i := 0; i < len(a); i++ {
ret[i] = a[i] + b[i]
}
return ret
}
//go:noinline
func t2(a, b C) C {
return t1(a, b)
}
```
and build with command: go build main.go
Thank you. Are there plans to add a type constraint which would allow this?
Maybe something like this?
func slice[From implements To, To any](from []From) []To { ... }
On Wednesday, August 24, 2022 at 7:30:22 AM UTC+2 Ian Lance Taylor wrote:
> On Tue, Aug 23, 2022 at 8:27 PM Frank Schröder
> w
Thanks for taking the time for the clue. It seems that this is an open
issue.
Actually, It work for this case. aovid the alloc will have more benefit for
gc.
在2022年8月26日星期五 UTC+8 02:49:08 写道:
> Actually, looking more closely at your benchmark numbers, the trick does
> not work in your case.