Re: [go-nuts] decoding DWARF data

2022-02-13 Thread stephen.t....@gmail.com
I've figured out what the problem is. The problem in my code was caused by the fact that this ELF/DWARF file has so many compile units, whereas my other examples have far fewer compile units. I'll try to explain what my mistake was: Task: Looking for the function declaration file/line, for an e

Re: [go-nuts] Strange cases of type definitions that use "[]", Go 1.17 and 1.18beta2

2022-02-13 Thread 'Axel Wagner' via golang-nuts
On Sun, Feb 13, 2022 at 11:23 PM Kamil Ziemian wrote: > "So, no, this is not something that I made up to have an example or > anything like that. I thought about a couple alternative ways to do it and > they all don't work for one reason or another." > > Thank you for the information. Do you chec

Re: [go-nuts] Re: Why you can name variable or type parameter int or uint8???

2022-02-13 Thread Kamil Ziemian
Thank you Jason and Axel. I know that "nil" is predeclared identifier from watching talk on YT "Understending nil" (or something like that) and know that it can be redefined. But, due to my background I still struggle with such things in Go. Old habits die hard, nothing more. Thank you Axel, yo

Re: [go-nuts] Strange cases of type definitions that use "[]", Go 1.17 and 1.18beta2

2022-02-13 Thread Kamil Ziemian
"I can't see a syntactical ambiguity, though. The series of tokens `type A [ B ] C` can, AFAICT, only be parsed as an array type declaration, generics or not (if there where *two* identifiers in the brackets, it would be something else, because that could be a generic type declaration. But not

Re: [go-nuts] decoding DWARF data

2022-02-13 Thread Ian Lance Taylor
On Sun, Feb 13, 2022 at 1:43 PM stephen.t@gmail.com wrote: > > I've encountered something else that I don't understand. This time regarding > dwarf.AttrDeclFile and how the value of that field relates to the list of > source files in the project > > From what I can understand, the value of A

Re: [go-nuts] Strange cases of type definitions that use "[]", Go 1.17 and 1.18beta2

2022-02-13 Thread Kamil Ziemian
"I think there is arguably a difference between generic functions and generic type declarations. In the former case, an argument name is rarely needed for the documentation, whereas in the latter case it's probably always needed. Though I'm not sure, really." I complain about, to make excuse fo

Re: [go-nuts] Does anyone gets automatic response from 944677...@qq.com?

2022-02-13 Thread Kamil Ziemian
Thank you for advise. sobota, 12 lutego 2022 o 10:39:44 UTC+1 Ge napisał(a): > The owner of this mail account may not even use it now. Just block this > email address. > > 在2022年2月11日星期五 UTC+8 22:02:11 写道: > >> Bad that this is not only my problem. Did anyone try to write to person >> that set

Re: [go-nuts] decoding DWARF data

2022-02-13 Thread stephen.t....@gmail.com
I've encountered something else that I don't understand. This time regarding dwarf.AttrDeclFile and how the value of that field relates to the list of source files in the project >From what I can understand, the value of AttrDeclFile is an index into an array of filenames. If the number is zero

[go-nuts] Move Go 1.2 Field Selectors and Nil Checks to golang.org/design

2022-02-13 Thread Manlio Perillo
Reading htps://golang.org/doc/go1.2, I found that the "Go 1.2 Field Selectors and Nil Checks" design at https://docs.google.com/document/d/14DgGJKGQeBTNJDXo3YxnlSwv7ouRqvj7BMmZw17vWV0/pub is not available at golang.org/design. Is it possible to move it to the Go proposal repository so that al

Re: [go-nuts] Strange cases of type definitions that use "[]", Go 1.17 and 1.18beta2

2022-02-13 Thread jake...@gmail.com
On Friday, February 11, 2022 at 10:02:42 AM UTC-5 kziem...@gmail.com wrote: > I'm seriously lost here. Code below works in both Go 1.17 and Go 1.18beta2 > > > package main > > > > import "fmt" > > > > type someInterface[3] interface { > > SomeMethod() > > } > > > > func main() { > >

[go-nuts] Re: New edition of the Go Programming Language comming soon ?

2022-02-13 Thread Amnon
I have not heard of any plans to bring out a new edition of the book. But the original 2015 edition is timeless, as it deals with the fundamentals of the language, of why things are the way they are. Yes they have been some additions to the language since 2015, but nothing which invalidates anythi

[go-nuts] New edition of the Go Programming Language comming soon ?

2022-02-13 Thread christoph...@gmail.com
Hello Go friends, is there a new edition of the "Go Programming Language" book to be published soon ? It is quite old now and there have been a few changes to Go since then. Go.mod and generics. I was considering buying it, but if a new edition comes out in a few months, it would be wasted mo