Where to put field documentation #7245
Replies: 3 comments 7 replies
-
Long comments could also be split around first available white space at some length: struct Bar {
foo string // foo does something.
// milk is different from foo because the comment is too long
// so `vfmt` could break it at some length to put it behind the field.
// That's why it's above the field.
milk Milk
} |
Beta Was this translation helpful? Give feedback.
-
My first instinct while reading the above 'milk' comment is as a continuation of the previous line, just like lines in a book. |
Beta Was this translation helpful? Give feedback.
-
btw, are there natural written languages, where reading direction changes in the middle of the page? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Short field docs are behind the field.
But what about long comments?
Last discussion with Alex was about moving it above if the comment is too long.
Does vdoc already handle this?
Beta Was this translation helpful? Give feedback.
All reactions