Closed Happypig375 closed 2 years ago
Note: As a hack, the XML comment can technically be inlined by placing in end of previous line.
type A = class end /// Docs for B
type B = struct end /// Docs for I
type I = interface end
I think this would be a worthwhile addition. Though it's a matter of taste whether this is good coding practice (main argument against it, in the C# world, is that it disallows commenting out large chunks of code during development, which is probably why most tooling in C# auto inserts the single line comments), I think we should allow it.
As an aside, I think that the editor should insert the triple slash automatically upon a new line, just like with C#. This would make writing such documentation easier in the current situation.
F# already supports multi-line XML doc comments:
/// <summary>
/// Documentation
/// </summary>
type C() = class end
It's worth calling out that the Java-ism that C# apparently supports automatically inserts a *
on new lines though, so there's still clutter. Extending the OCAML-style comments in F# to also support XML doc tags seems generally fine, though I don't imagine it'll be a high priority.
F# already supports multi-line XML doc comments
I believe the OP meant that you wouldn't need to use single line comments to get multi line xml comments. But I could be wrong ;)
Extending the OCAML-style comments in F# to also support XML doc tags seems generally fine, though I don't imagine it'll be a high priority.
Ha yes, no idea why I wrote that. Anyway no intention to support this, there's no need to have two ways to do xml docs.
Support multi-line XML documentation comments
I propose we support multi-line XML documentation comments
The existing way of approaching this problem in F# is using single-line XML documentation comments.
C
Single-line
Multi-line
F
Single-line
Multi-line (Does not work currently, proposed to allow)
Variations of usage:
Compare:
Pros and Cons
The advantages of making this adjustment to F# are
///
for each lineThe disadvantages of making this adjustment to F# are
///
usually is its own line)Extra information
Estimated cost (XS, S, M, L, XL, XXL): S-M
Related suggestions: No
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply: