5 ms·
I hated the idea of using comments as directives when Go 1.4 introduced //go:generate. But, holy, they were there from the beginning? They bring back my painfu
by yokohummer7 9y ago
I hated the idea of using comments as directives when Go 1.4 introduced //go:generate. But, holy, they were there from the beginning?
They bring back my painful memories of the old days when I had to use conditional comments to support IE6...
- klodolph 9y agoComments are also interpreted by go build, to choose which files to build on each platform. Memories of IE6 are painful because of the deviation from the standard, but with Go you don’t have that problem.
- Krabby127 9y agoPossibly off topic, but Verilog has something similar. //read_comments_as_hdl_on is a thing and it makes it a pain.
- majewsky 9y agoIE's conditional comments were actually a pretty elegant solution given that you had to be compatible with every other HTML parser out there. The painful memories that I recall are about IE 6/7 itself, not about conditional comments.
- marcosdumay 9y agoEvery higher level language has directives nowadays, and those almost every time encoded in comments. Honestly, between documentation, compiler pragmas, linter directives, packaging and linking instructions, and etc, we are getting into a point where languages will need to specify something like "comments starting with this string must be ignored".
- lurr 9y ago> and those almost every time encoded in comments which lanugages do that?