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

2022-02-14 Thread Kamil Ziemian
After reading your answers, I was looking for Go gotchas and I find this. At the first look it looks promising, do you have opinion on it? http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in-go-golang/ Best, Kamil niedziela, 13 lutego 2022 o 23:58:14 UTC+1 Kamil Ziemian napisaƂ(a): >

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,

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

2022-02-11 Thread Jason Phillips
In C and C++[1][2] "int" and "float" are reserved keywords and thus can't be used as identifiers. In Go[3], "int" and "float64" are "predeclared identifiers"[4] and can be redefined, just like any other identifier. [1] - https://en.cppreference.com/w/c/keyword [2] -