24

This is an example if statement:
if(bla.boolean()){
}

Bill does NOT put comments into the condition brackets.

Be like bill.

Please.

Comments
  • 3
    What..?
  • 10
    @hexc if (bla.boolean() /*because this n that*/ || /*aaaaa*/ other) {}
  • 2
    Yeah, that is a very bad programming practice. Code should be as self explanatory as you can
  • 7
    I'm so happy I've never seen anyone do that. That person probably wouldn't exist anymore. If I ever saw a comment inside a conditional I'd flip my shit
  • 4
    I hope no one does this:

    if(bla.boolean(/* convert to boolean */) /*Check if that thing is true*/){

    }
  • 0
    I do it sometimes to explain my overall purpose, not the condition. It also somehow does good with nested conditions.
  • 0
    @illegaldisease Why would you do that... there is enough space to the right of your code
  • 0
    @HTMLspecialist I think i misunderstood when you said brackets. I thought you were talking about curly brackets and i was wondering what is wrong with that.

    I do this :

    if(bla.bla()){ //Blabla does blabla

    }

    Not this ugly shit

    if(bla.bla()/*Blabla does blabla*/){

    }
  • 0
    I prefer guard syntax for including comments in branch logic:

    f n
    | n == 0 = 0 -- comment
    | n == 1 = 1 -- comment
    | True = f (n-1) + f (n-2)

    (have you heard about my lord and savior haskell?)
  • 0
    @illegaldisease yeah that is better :p
  • 0
    @bittersweet yes i know haskell from others but i don't use it
Add Comment