Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Source Code


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jul 11, 2017 7:08 PM Last Post By: Dave Nottage
Guest
Source Code
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2017 12:46 PM
I'm having an argument, sorry discussion, with another programmer on the subject of blank lines.
He claims that blank lines should be removed. I claim that the compiler ignores blank lines as it does whitespace.
Which of us is right?
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: Source Code  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2017 12:59 PM   in response to: Guest in response to: Guest
Rodney Nicholls wrote:
I'm having an argument, sorry discussion, with another programmer on the subject of blank lines.
He claims that blank lines should be removed. I claim that the compiler ignores blank lines as it does whitespace.
Which of us is right?

You are blank lines has no effect on the compiler/linker. Blank lines often can
be used to improve readability so do have positive impact, but it does not have
a negative one from a compiler standpoint.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Source Code  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2017 7:08 PM   in response to: Guest in response to: Guest
I'm having an argument, sorry discussion, with another programmer on the subject of blank lines.
He claims that blank lines should be removed. I claim that the compiler ignores blank lines as it does whitespace.
Which of us is right?

If he's claiming that blank lines and whitespace adversely affect the compiler, he's wrong; unless you include many megabytes of whitespace on purpose.

The amount of time that the compiler takes to skip the whitespace is not even worth worrying about, especially when weighing it up with the advantages of readability.

--
Dave Nottage [TeamB]
Find hints tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02