4

// comment
or
/* comment */

Comments
  • 1
    //comment is for a actual comments

    /*comment*/ should only be used commenting out code

    These are some unwritten rules
  • 2
    If it's a whole line comment, //
    If it's a multi-line comment or commenting out something in the middle of the line, /* */

    P.S. I kind of hate how VSCode handles those; I need an extra extension just to automatically insert the proper one, and selecting a whole comment block requires an absurd amount of steps. WebStorm was perfect in that.
  • 1
  • 5
    # this is a comment
    // this is another comment
    ; this is also a comment
    /* this is another one */
    /** ooh a bigger one **/
    "" here's a good one
    ' fuck this is one too

    Nope, I think that's all of them I've used this month so far.
  • 0
    @C0D4 Yeah, kind of silly that it was implied that only C-like syntaxes exist.
  • 1
    Depends, if it's a doclet, legal text or commented block of code then the multi-line one (although for doclets it would be /** */).
    For the rest //.
  • 0
    "// Comment" is C++ style, not C
    C only really have "/* Comment */"

    I find "/* */" generally cleaner and use "//" mostly to comment out lines or shit while coding
Add Comment