Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Tabs vs Spaces

Tabs vs Spaces

Scheduled Pinned Locked Moved The Lounge
visual-studioquestion
51 Posts 26 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L l a u r e n

    i was thinking people who use spaces should be shot :laugh:


    "penguins have no bill"
    biz stuff   about me

    T Offline
    T Offline
    Taka Muraoka
    wrote on last edited by
    #13

    l a u r e n wrote: i was thinking people who use spaces should be shot Then I'll meet you behind the church at dawn!


    Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

    1 Reply Last reply
    0
    • T Taka Muraoka

      Wrong options. Do you: 1) use spaces in your code? 2) prefer to die now?


      Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

      J Offline
      J Offline
      J Dunlap
      wrote on last edited by
      #14

      What happened to: Free speech? The pursuit of happiness? Life? Liberty? ;) ;P Ok, just teasing.

      "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
      "You must be the change you wish to see in the world." - Mahatma Gandhi

      T 1 Reply Last reply
      0
      • J J Dunlap

        What happened to: Free speech? The pursuit of happiness? Life? Liberty? ;) ;P Ok, just teasing.

        "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
        "You must be the change you wish to see in the world." - Mahatma Gandhi

        T Offline
        T Offline
        Taka Muraoka
        wrote on last edited by
        #15

        Don't sweat the petty stuff. Spaces vs. tabs is much more important :-|


        Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

        D 1 Reply Last reply
        0
        • T Taka Muraoka

          Wrong options. Do you: 1) use spaces in your code? 2) prefer to die now?


          Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #16

          Being safely on the other side of the planet... So what's so bad about tabs??? Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
          Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
          Every line of code is a liability - Taka Muraoka
          Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

          T 1 Reply Last reply
          0
          • M Marc Clifton

            Being safely on the other side of the planet... So what's so bad about tabs??? Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
            Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
            Every line of code is a liability - Taka Muraoka
            Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

            T Offline
            T Offline
            Taka Muraoka
            wrote on last edited by
            #17

            Marc Clifton wrote: So what's so bad about tabs??? Spot the guy who doesn't have to work with other developers :rolleyes: Sigh...


            Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

            J 1 Reply Last reply
            0
            • L l a u r e n

              i was thinking people who use spaces should be shot :laugh:


              "penguins have no bill"
              biz stuff   about me

              R Offline
              R Offline
              Roger Wright
              wrote on last edited by
              #18

              l a u r e n wrote: people who use spaces should be shot I agree. I never use spaces. Or tabs. Or carriage returns, for that matter. Onelonglineofcodeafteranothershouldbeclearenoughforanyone;Thesemicolonsandcurlybracketsareeasyformachinestoreadanditdoesn'tmatterwhetherotherpeoplecanmakesenseofitwhenI'mdonebecauseit'salreadyperfectasitis.

              "Ask not for whom the bell tolls;
              It tolls for thee..."

              D C 2 Replies Last reply
              0
              • L l a u r e n

                i was thinking people who use spaces should be shot :laugh:


                "penguins have no bill"
                biz stuff   about me

                S Offline
                S Offline
                Shog9 0
                wrote on last edited by
                #19

                ...and shoot everyone...

                Shog9

                So much he don't understand, Just might never make it to a man...

                D 1 Reply Last reply
                0
                • R Rein Hillmann

                  I know that this is quite a heated debate and I was always on the "Tabs forever" side of the argument but recently I've switched to spaces instead of tabs (due to factors outside of my control) and to be honest, I'm LOVING it. Now I can align all my code the way I like it and not have to worry about the tabs lining up with the parenthesis. What do you guys mostly use? Do your companies have a convention on this?

                  N Offline
                  N Offline
                  Navin
                  wrote on last edited by
                  #20

                  Tabs. I just find them easier, especially when arrowing through code (takes less time to go through tabs than it does spaces.) And now that's dictated in our team's coding standard. :-D Although with all the nifty souce formatting tools out there (including what's included in Visual), it doesn't matter as much as it used to... back in the days when taking out a block of code embedded deep in a loop and putting it into its own function meant a day's worth of work deleting all the extra spaces. "When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein

                  R 1 Reply Last reply
                  0
                  • T Taka Muraoka

                    Marc Clifton wrote: So what's so bad about tabs??? Spot the guy who doesn't have to work with other developers :rolleyes: Sigh...


                    Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                    J Offline
                    J Offline
                    J Dunlap
                    wrote on last edited by
                    #21

                    If you want us to see it your way, at least tell us why tabs are so bad.

                    "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                    "You must be the change you wish to see in the world." - Mahatma Gandhi

                    T 1 Reply Last reply
                    0
                    • J J Dunlap

                      If you want us to see it your way, at least tell us why tabs are so bad.

                      "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                      "You must be the change you wish to see in the world." - Mahatma Gandhi

                      T Offline
                      T Offline
                      Taka Muraoka
                      wrote on last edited by
                      #22

                      jdunlap wrote: tell us why tabs are so bad. Have you ever had to work on source code written by somebody who had their tab stops set differently to you?


                      Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                      J S M 3 Replies Last reply
                      0
                      • T Taka Muraoka

                        jdunlap wrote: tell us why tabs are so bad. Have you ever had to work on source code written by somebody who had their tab stops set differently to you?


                        Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                        J Offline
                        J Offline
                        J Dunlap
                        wrote on last edited by
                        #23

                        But I thought that's the whole point of tabs - you only type one tab per indent level, and everyone can set their own setting for the number of character widths a tab is made up of.

                        "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                        "You must be the change you wish to see in the world." - Mahatma Gandhi

                        T 1 Reply Last reply
                        0
                        • J J Dunlap

                          But I thought that's the whole point of tabs - you only type one tab per indent level, and everyone can set their own setting for the number of character widths a tab is made up of.

                          "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                          "You must be the change you wish to see in the world." - Mahatma Gandhi

                          T Offline
                          T Offline
                          Taka Muraoka
                          wrote on last edited by
                          #24

                          In a perfect world, that's perhaps what would happen. In practice, it never does. People often want to lay things out (e.g. in comments) but align on columns that are not at tabstops. So they type TAB TAB SPACE SPACE "xxx". Which ends up unreadable unless you have your tabstops set the same.


                          Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                          J F 2 Replies Last reply
                          0
                          • T Taka Muraoka

                            In a perfect world, that's perhaps what would happen. In practice, it never does. People often want to lay things out (e.g. in comments) but align on columns that are not at tabstops. So they type TAB TAB SPACE SPACE "xxx". Which ends up unreadable unless you have your tabstops set the same.


                            Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                            J Offline
                            J Offline
                            J Dunlap
                            wrote on last edited by
                            #25

                            Sounds like a catch-22 to me. :( To each, his own choice (but then, of course, everyone gets the results of each other's choice as well as their own).

                            "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                            "You must be the change you wish to see in the world." - Mahatma Gandhi

                            T 1 Reply Last reply
                            0
                            • J J Dunlap

                              Sounds like a catch-22 to me. :( To each, his own choice (but then, of course, everyone gets the results of each other's choice as well as their own).

                              "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                              "You must be the change you wish to see in the world." - Mahatma Gandhi

                              T Offline
                              T Offline
                              Taka Muraoka
                              wrote on last edited by
                              #26

                              jdunlap wrote: Sounds like a catch-22 to me. Not at all. If you always use spaces, everything will align correctly regardless of what anybody's tab settings are.


                              Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                              J 1 Reply Last reply
                              0
                              • T Taka Muraoka

                                jdunlap wrote: Sounds like a catch-22 to me. Not at all. If you always use spaces, everything will align correctly regardless of what anybody's tab settings are.


                                Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                                J Offline
                                J Offline
                                J Dunlap
                                wrote on last edited by
                                #27

                                :rose: I like my indenting to be more than one character width, and I don't want to have to go space-space-space-space for each indent. :rose: Things can get really messed up with spaces, as it takes so many spaces for an indent. Why not use spaces for comments, etc, and then tabs for other indents?

                                "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                                "You must be the change you wish to see in the world." - Mahatma Gandhi

                                T 1 Reply Last reply
                                0
                                • J J Dunlap

                                  :rose: I like my indenting to be more than one character width, and I don't want to have to go space-space-space-space for each indent. :rose: Things can get really messed up with spaces, as it takes so many spaces for an indent. Why not use spaces for comments, etc, and then tabs for other indents?

                                  "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                                  "You must be the change you wish to see in the world." - Mahatma Gandhi

                                  T Offline
                                  T Offline
                                  Taka Muraoka
                                  wrote on last edited by
                                  #28

                                  jdunlap wrote: I don't want to have to go space-space-space-space for each indent. Virtually every editor on the planet has a switch to insert spaces instead of tabs. jdunlap wrote: Why not use spaces for comments, etc, and then tabs for other indents? Consistency. If you use one of the above-mentioned editors, then you don't have to remember anything.


                                  Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                                  J D 2 Replies Last reply
                                  0
                                  • T Taka Muraoka

                                    jdunlap wrote: I don't want to have to go space-space-space-space for each indent. Virtually every editor on the planet has a switch to insert spaces instead of tabs. jdunlap wrote: Why not use spaces for comments, etc, and then tabs for other indents? Consistency. If you use one of the above-mentioned editors, then you don't have to remember anything.


                                    Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                                    J Offline
                                    J Offline
                                    J Dunlap
                                    wrote on last edited by
                                    #29

                                    Ahh... You're right! I checked into it, and I've been using them all along - just used the tab key to indent. :-O :-O

                                    "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                                    "You must be the change you wish to see in the world." - Mahatma Gandhi

                                    T 1 Reply Last reply
                                    0
                                    • J J Dunlap

                                      Ahh... You're right! I checked into it, and I've been using them all along - just used the tab key to indent. :-O :-O

                                      "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                                      "You must be the change you wish to see in the world." - Mahatma Gandhi

                                      T Offline
                                      T Offline
                                      Taka Muraoka
                                      wrote on last edited by
                                      #30

                                      Good lad :-D ;P


                                      Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                                      J 1 Reply Last reply
                                      0
                                      • T Taka Muraoka

                                        Good lad :-D ;P


                                        Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.

                                        J Offline
                                        J Offline
                                        J Dunlap
                                        wrote on last edited by
                                        #31

                                        Taka Muraoka wrote: Good lad :laugh:

                                        "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                                        "You must be the change you wish to see in the world." - Mahatma Gandhi

                                        1 Reply Last reply
                                        0
                                        • R Roger Wright

                                          l a u r e n wrote: people who use spaces should be shot I agree. I never use spaces. Or tabs. Or carriage returns, for that matter. Onelonglineofcodeafteranothershouldbeclearenoughforanyone;Thesemicolonsandcurlybracketsareeasyformachinestoreadanditdoesn'tmatterwhetherotherpeoplecanmakesenseofitwhenI'mdonebecauseit'salreadyperfectasitis.

                                          "Ask not for whom the bell tolls;
                                          It tolls for thee..."

                                          D Offline
                                          D Offline
                                          David Stone
                                          wrote on last edited by
                                          #32

                                          Amazingly I could read that... :omg:


                                          Hawaian shirts and shorts work too in Summer. People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage... -Anna-Jayne Metcalfe on Paintballing

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups