Re: [go-nuts] Why, oh why, do people do this? Things that annoy me in Go code.

2022-03-07 Thread Henry
Naming things is one of the hardest things a programmer needs to do. Seriously. On Tuesday, March 8, 2022 at 6:08:09 AM UTC+7 ba...@iitbombay.org wrote: > GoBOL, anyone? > > > On Mar 7, 2022, at 2:20 PM, Rob Pike wrote: > > > > It could have been > > > > interface > UnreceivedMasterOrdersInte

Re: [go-nuts] Why, oh why, do people do this? Things that annoy me in Go code.

2022-03-07 Thread Bakul Shah
GoBOL, anyone? > On Mar 7, 2022, at 2:20 PM, Rob Pike wrote: > > It could have been > > interface > UnreceivedMasterOrdersInterfaceThatCanBeUsedToCallGetUnreceivedByProductsWarehouseAndCompany > > Seriously, though, your example isn't even on the same planet as some > of the examples I've see

Re: [go-nuts] Why, oh why, do people do this? Things that annoy me in Go code.

2021-12-10 Thread Jason E. Aten
Ya I think _, _ = blah() is ugly, but it's actually not a bad idea to communicate to the next person that you did really mean to ignore that value, error. Otherwise they have to ask you. So I usually comment it, but the linter can't read the comment, so actually the _ is better. On Friday, Dec

Re: [go-nuts] Why, oh why, do people do this? Things that annoy me in Go code.

2021-12-09 Thread Amnon
Indeed. There are quite a few linters out there which object to good idiomatic code and which would fail the Go Standard Library. And too many people are happy to pollute their codebase with extraneous noise, rather than fixing the linters, or using just using high quality linters (such as go

Re: [go-nuts] Why, oh why, do people do this? Things that annoy me in Go code.

2021-12-09 Thread Jason E. Aten
6 is probably because of the linters that complain if you don't. On Thursday, December 9, 2021 at 7:32:54 AM UTC-6 ren...@ix.netcom.com wrote: > 5 is a best practice when you having multiple implementations written in > different languages - especially when developed independently. > > On Dec

Re: [go-nuts] Why, oh why, do people do this? Things that annoy me in Go code.

2021-12-09 Thread Robert Engels
5 is a best practice when you having multiple implementations written in different languages - especially when developed independently. > On Dec 9, 2021, at 6:10 AM, Amnon wrote: > > 1) Long functions that go on forever and contain long lambdas and 8 levels > of indentation. > > 2) Long var

[go-nuts] Why, oh why, do people do this? Things that annoy me in Go code.

2021-12-09 Thread Amnon
1) Long functions that go on forever and contain long lambdas and 8 levels of indentation. 2) Long variable names. 3) Variable names which include the type of the variable. 4) Packages whose name contain the word '/pkg/' 5) Repos which contain the prefix go- 6) Code where almost every line pr