3 ms·
> More concerning is that un-named parameters are a compiler error and this cannot be adjusted. Would you be willing to expand this a bit? This would save you
by peteradio 4y ago
> More concerning is that un-named parameters are a compiler error and this cannot be adjusted.
Would you be willing to expand this a bit? This would save you from giving a dummy name in a function?
- neandrake 4y agoI think it’s a typo and they meant unused parameters.
- LAC-Tech 4y agoYes, I meant unused parameters. Makes it very hard to do TDD.
- kuon 4y agoI have an editor macro that inserts _ = myvar; // TODO remove easily for all function arguments when prototyping. I agree it can be cumbersome, but I am not sure it is a bad thing.
- 41b696ef1113 4y agoNot that I write Go anymore, but this was definitely one of those things that regularly made my blood boil. Any kind of experimentation/swapping around data structures always invoked the wrath of the compiler when I am just trying to quickly iterate on an idea. Always felt like it disincentivized improvements. Should have been a warning. Baked in from day-one, easily makes that a CI check without hampering development.
- kaba0 4y agoTS with this lint enabled as well. When these languages tout fast iteration cycles, yet for a single-line code you have to do a recursive, n-step compilation of everything that might also get unused is literally insane and indefensible position.