4 Replies - 532 Views - Last Post: 12 July 2016 - 06:05 AM

#1 tonyal  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 85
  • Joined: 23-September 14

Whitespace - pros and any cons?

Posted 10 July 2016 - 06:11 PM

I'm new to PERL, and I'm trying to find articles for whitespace for PERL - most of them are for other languages and I'm not sure if it all works the same. From what I've seen I think it consists of things like \s,\t,\n,\r,\f that adds clear space between things. Besides making the code shorter without having to use the spacebar for large amounts of space, what would any more pros be? I can't really thing of any cons - one article I read said that using brackets were better, but that was for Python, so I'm not sure if that applies here.

Thank you in advance, I greatly appreciate any help - I have a feeling this is more simple than I'm making it out to be.

Is This A Good Question/Topic? 0
  • +

Replies To: Whitespace - pros and any cons?

#2 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2329
  • View blog
  • Posts: 9,356
  • Joined: 03-December 12

Re: Whitespace - pros and any cons?

Posted 10 July 2016 - 10:20 PM

Whitespace as far as what? Code is easier to read with whitespace and proper indentations, is that what you are referring to?
Was This Post Helpful? 1
  • +
  • -

#3 tonyal  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 85
  • Joined: 23-September 14

Re: Whitespace - pros and any cons?

Posted 11 July 2016 - 03:13 AM

View Postastonecipher, on 10 July 2016 - 10:20 PM, said:

Whitespace as far as what? Code is easier to read with whitespace and proper indentations, is that what you are referring to?

Yes, are there any cons of using it? I haven't been able to find any.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is offline

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,565
  • Joined: 12-December 12

Re: Whitespace - pros and any cons?

Posted 11 July 2016 - 03:23 AM

There are no cons other than the minuscule amount of time it takes to type a few extra characters, even this is offset in modern IDEs that can auto-indent and format (or reformat) code.

The labour of typing a few extra characters is paid back many times over by how much easier and quicker it is to read the code.
Was This Post Helpful? 1
  • +
  • -

#5 tonyal  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 85
  • Joined: 23-September 14

Re: Whitespace - pros and any cons?

Posted 12 July 2016 - 06:05 AM

View Postandrewsw, on 11 July 2016 - 03:23 AM, said:

There are no cons other than the minuscule amount of time it takes to type a few extra characters, even this is offset in modern IDEs that can auto-indent and format (or reformat) code.

The labour of typing a few extra characters is paid back many times over by how much easier and quicker it is to read the code.


Thanks! :bananaman:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1