3 ms·
Agree as well. They could use the same convention as typescript and use a triple slash instead. That wouldn't change much of the language and impact IDEs, but
by bsaul 12y ago
Agree as well.
They could use the same convention as typescript and use a triple slash instead. That wouldn't change much of the language and impact IDEs, but at least distinguish between human comments and tooling instructions.
- enneff 12y agoWhat's the difference between "///" and "//go:"? The latter is Go's official convention, it's just that unfortunately some of our older mechanisms predate the convention.
- bsaul 12y agoNone, i just didn't know about //go: :)
- Merkur 12y agono difference - both are misused comments. the main problem is not technologie but semantic. If you agree with me that the meaning of a comments is communication between humans, than you must also agree - in my opinion - that comments can not be directives to a tool chain. It is ambiguous. It is error prone. It is easily solved using an other token. And in the long run it may lead to madness like Java testing and documenting frameworks. as for technical problems - I think some really bad ones are mentioned in this very discussion!
- anatoly 12y agoWhat do you mean "Go's official convention"? Go is a language; it has a spec. Is it in the spec? No. What is this "Go" that this is an official convention of, and where is it standartised beyond your comment?
- tomjen3 12y agoRealistically there is no big difference between /// and //go: although the former is well used (Java, C# and, probably more importantly for Golang, jsdocs are written as /). Either would be useful. But the complaint is about //foobar: and that is just confusing.