5 ms·
And there's //line path/to/file:linenumber and //go:noescape
by vorg 11y ago
And there's
//line path/to/file:linenumber
and
//go:noescape
- ominous_prime 11y agodon't forget //go:nosplit too
- scottpiper 11y agoAnd go:linkname, go:nointerface, and go:nowritebarrier You can see the lexer for these here: https://github.com/golang/go/blob/88c08b06b97296e41fc3069f4afbc86d24707b05/src/cmd/internal/gc/lex.go#L1552 https://github.com/golang/go/blob/88c08b06b97296e41fc3069f4a...
- mattkrea 11y agoReminds me of typescript /// <reference path="../typings/tsd.d.ts" />
- kevingadd 11y ago/// is metadata/docstrings - it's a convention from C#. So a /// block is parsed by the compiler and tooling (to generate documentation xml files, for example), while a // comment is not parsed at all, just stripped.
- mattkrea 11y agoGotcha. Although most of the guys I see use the /// <summary> stuff as comments in the real world I guess I can see the difference.