Open Mte90 opened 4 days ago
i think we should use ///
and /** */
for doc strings to be consistent with rust
also we should think through tags like this:
/**
@return It will return none if has failed
*/
async fn get_user() -> Option<User> { ... }
id say we go with these:
tag | desc |
---|---|
@return {desc} |
is used to describe a function's return value |
@param {paramName} {desc} |
is used to describe a function's param |
@author {name} |
is used to describe the author |
@license {SPDXID} |
to describe the license |
Seems the best way, maybe with https://docs.rs/comment-parser/latest/comment_parser/ we can implement easily?
So right now we have tons of function in stdlib.
Can be handy to document them in the file itself, in this way the documentation can generated aautomatically. So I was thinking something for that.
In Amber looking at the doc there is no way right now for commenting, so we need to choose what is the best way.
Rust uses
/**
like PHP (https://doc.rust-lang.org/reference/comments.html), python instead use"""the sentence"""
.