On 13-08-25 07:25 PM, Brendan Zabarauskas wrote: > brson and the Style Guide seem to favour stacked line comments: > https://github.com/mozilla/rust/wiki/Note-style-guide#comments > > "Reason: it avoids the debate about whether to put stars on every line, etc." > is an important point. I was trying to standardise std::num to style C when I > was working on it. I would be happy if A and B were removed. /* */ is still > useful for commenting out code though, but not for doc comments.
There were a couple other arguments in favour of //-style: - Consistency: one-line comments invariably start this way; switching style at some threshold makes for yet another axis of inconsistency. - Non-nesting of /**/: to keep our lexical grammar regular, /**/ do not nest. This means that if someone wants to comment-out a block with /**/ (rather than ignore!()) they cannot do so if it has /**/-style comments inside it, only //-style. Personally I don't have a strong opinion but I am habitually very poor at documenting my code, so even if I did it probably shouldn't count :( -Graydon _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev