Menu

EndIf vs. End If (with a space)

brentoboy
2005-03-21
2013-03-08
  • brentoboy

    brentoboy - 2005-03-21

    I was just thinking to myself...

    Which is better..

    If x > 0
      ...
    EndIf  //no space

    or

    If x > 0
      ...
    End If  //with a space

    Remember, whatever we choose gets propagated throughout...

    EndLoop
    EndWhile
    EndFor
    EndFunction

    The reason I suggest using the "no space" version of the word is because a compiler will be able to use a single token to make decisions instead if having to pair up the words as it compiles.  The words are always used together, should they not be combined?

    What does everyone think?  Is it more readable the other way?

     
    • brentoboy

      brentoboy - 2005-04-08

      Ok, no comments on this one.

      I'm thinking it makes sense to use the "with a space" flavor becuase we are here to make things readable and easy to do.

      The compilers wont have that much more work to do to decide what we are talking about.

       

Log in to post a comment.

MongoDB Logo MongoDB