Re: [go-nuts] go11tag

2023-07-28 Thread Ian Lance Taylor
On Fri, Jul 28, 2023 at 9:55 AM John Pritchard wrote: > > Debugging "go build" with dlv, which hungup at > > go/src/cmd/go/main.go:92:var _ = go11tag > > Looking around a bit, found no particular rationale for the existence of > "go11tag". It's a small test. See the comment on the defin

[go-nuts] go11tag

2023-07-28 Thread John Pritchard
Hello, Debugging "go build" with dlv, which hungup at go/src/cmd/go/main.go:92:var _ = go11tag Looking around a bit, found no particular rationale for the existence of "go11tag". Best, John -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Re: Amateur's questions about "Go lang spec"

2023-07-28 Thread Brian Candler
If you wanted to be absolutely clear, you could insert "The following are examples of expression statements" - although it didn't really trouble me as-is. On Friday, 28 July 2023 at 16:12:11 UTC+1 Jason Phillips wrote: > The confusion may come from the fact that a list of forbidden built-in >

Re: [go-nuts] Re: Amateur's questions about "Go lang spec"

2023-07-28 Thread Jason Phillips
The confusion may come from the fact that a list of forbidden built-in operations is immediately followed by a list of (mostly) allowed operations that illustrate the original rule? With the exception of "len", it may be more clear for it to be structure like: ExpressionStmt = Expression

Re: [go-nuts] Re: Amateur's questions about "Go lang spec"

2023-07-28 Thread 'Axel Wagner' via golang-nuts
Note also, that you didn't paste the entire section: With the exception of specific built-in functions, function and method calls and receive operations can appear in statement context. Such statements may be parenthesized. […] The following built-in functions are not permitted in statement contex

Re: [go-nuts] Re: Amateur's questions about "Go lang spec"

2023-07-28 Thread 'Axel Wagner' via golang-nuts
On Fri, Jul 28, 2023 at 4:04 PM Kamil Ziemian wrote: > Hello, > > After a long break, I go back to reading Go Spec. > > In the section "Expression statements" we read that "The following > built-in functions are not permitted in statement context: > > append cap complex imag len make new real > u

Re: [go-nuts] Re: Amateur's questions about "Go lang spec"

2023-07-28 Thread Kamil Ziemian
Hello, After a long break, I go back to reading Go Spec. In the section "Expression statements" we read that "The following built-in functions are not permitted in statement context: append cap complex imag len make new real unsafe.Add unsafe.Alignof unsafe.Offsetof unsafe.Sizeof unsafe.Slice

[go-nuts] about "hybrid barrier"

2023-07-28 Thread metronome
Hi, I came across two questions regarding the hybrid barrier that I am hoping someone can help with. 1. Chang https://go-review.googlesource.com/c/go/+/31765 says: *"It's unconditional for now because barriers on channel operations require checking both the source and destination stacks a

[go-nuts] about "hybrid barrier"

2023-07-28 Thread metronome
Hi, I came across two questions regarding the hybrid barrier that I am hoping someone can help with. 1. Chang https://go-review.googlesource.com/c/go/+/31765 says: "It's unconditional for now because barriers on channel operations require checking both the source and destination stacks and we

Re: [go-nuts] Re: Generics and "static" adapters

2023-07-28 Thread 'Axel Wagner' via golang-nuts
Why not remove the `recordFactory` type then? type Record interface { Key() string Marshal() []byte Unmarshal([]byte) error } func put[R Record](db *SimpleDatabase, t UpdateTransaction, v R) error { k := v.Key() b := v.Marshal() if err := db.put(t, k, b); err != nil {

[go-nuts] Re: Generics and "static" adapters

2023-07-28 Thread Salvatore Domenick Desiano
I guess I didn't ask an actual question... is there a more idiomatic way of doing this? Thank you! -- Salvatore smile. On Monday, July 24, 2023 at 4:00:59 PM UTC-4 Salvatore Domenick Desiano wrote: > Ever since 1.18 came out I've been struggling to find an idiomatic way to > implement a cer