▲ | linhan_dot_dev 4 days ago | ||||||||||||||||
I like the Go language because it's straightforward and clear, even if it looks a bit plain. I hope the feature mentioned in the article will cause a compiler error. However, I wouldn't use this approach when writing my own code. | |||||||||||||||||
▲ | eru 4 days ago | parent | next [-] | ||||||||||||||||
> I hope the feature mentioned in the article will cause a compiler error. Read the article. It won't. At best you can perhaps find a linter that'll report it? > However, I wouldn't use this approach when writing my own code. You might use it by accident. | |||||||||||||||||
| |||||||||||||||||
▲ | linhan_dot_dev 4 days ago | parent | prev | next [-] | ||||||||||||||||
I tested the tool more thoroughly using a strict method to review the code, but it couldn't find the problems mentioned in the article. golangci-lint run --enable-all --max-issues-per-linter=0 --max-same-issues=0 | |||||||||||||||||
▲ | linhan_dot_dev 4 days ago | parent | prev [-] | ||||||||||||||||
This comment unexpectedly received a few downvotes, which might be due to some misunderstanding. My point is as follows: 1. People choose Go for various reasons. 2. Beginners will encounter the issues mentioned in the article, so I hope there could be a feature that provides hints for newcomers. While the compilation errors might not be reasonable, at least the LSP/linter could provide some guidance. | |||||||||||||||||
|