Thursday, 2 March 2017

Tabs v Spaces

Tabs or Spaces?  Does it even matter, so long as you / your team are consistent?  For many SAS developers the standard place to write code is the Program Editor - for which the default setting is to use tabs, else 4 spaces.

Interestingly - the generated code in Enterprise Guide and DI Studio uses 3 spaces.

My preference is 2 spaces, but what do you think is the most commonly used approach out there?

Uku Pattack has created a github page  which may settle (or inflame!) this classic Holy War.  It scans all github repos (over 1 star) for .sas files, and checks the tab vs space usage.  Here are the results:

So - which do you think was most popular?  The choices are:
  • 8 spaces
  • 4 spaces
  • 3 spaces
  • 2 spaces
  • Tabs
Head over to Uku's site to find out!  


  1. What-ever
    Please replace with spaces
    Then it wont matter that we choose differently

  2. This is a great post. I like this topic.This site has lots of advantage. It helps me in many ways.Thanks for posting this again.

    Base SAS Training in Chennai

  3. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    SEO Company in India