4 ms·
What'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 c
by enneff 11y ago
What'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 11y agoNone, i just didn't know about //go: :)
- Merkur 11y 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 11y 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 11y 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.