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

2022-03-07 Thread Rudolf Martincsek
Latest interface my colleagues wrote (it's PHP) --- interface UnreceivedMasterOrdersInterface { public function getUnreceivedByProductsWarehouseAndCompany(array $productIds, int $warehouseId, int $companyId): array; } --- There is interest to switch to Go for some of the stuff we write, but I

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

2022-01-31 Thread Rudolf Martincsek
es, because you'll say that I'm exaggerating, but of course I can't. And on top of this, english is not our mother language, but we write code in english. Reading the code becomes atrocious. On Monday, January 31, 2022 at 11:34:47 PM UTC+2 Thomas Bushnell, BSG wrote: > On Fri

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

2022-01-31 Thread Rudolf Martincsek
o the problem in point 1 than to break the > function down into lots of little functions *with meaningful names*? (If > the names (and pieces) aren't meaningful you've only technically broken it > down.) > > On Friday, January 28, 2022 at 10:12:48 AM UTC-8 Rudolf Martin

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

2022-01-28 Thread Rudolf Martincsek
> 2) Long variable names. Where I work (not in Go), writing comments is frowned upon. That includes "docblock" style comments. If a function needs to be documented, it means the implementation is too complex and must be broken apart to reduce cyclomatic or whatever perceived complexity. Also un