> Is the constant publically visible? Then it's probably top level, so a > comment directly above it works. That's what Go does. >
This would require a separate comment-processing pass, which is possible but suboptimal (because unlike Go, Julia is a dynamic language and generally has no discrete "compilation pass"). Stefan's suggestion of just storing the comments in the AST for the function doesn't apply here, because constants don't store an AST.