Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
Mac ( mac@programming.dev )  to Programming@programming.dev · 3 years ago

Tabs are objectively better than spaces - gomakethings.com

gomakethings.com

external-link
message-square
116
link
fedilink
  • cross-posted to:
  • technews@radiation.party
  • hackernews@derp.foo
149
external-link

Tabs are objectively better than spaces - gomakethings.com

gomakethings.com

Mac ( mac@programming.dev )  to Programming@programming.dev · 3 years ago
message-square
116
link
fedilink
  • cross-posted to:
  • technews@radiation.party
  • hackernews@derp.foo
Tabs are objectively better than spaces
gomakethings.com
external-link
Yesterday, I shared some spicy takes. A few were particularly controversial—most notably, that I correct Gif the correct way (with a soft G)—but I also got a lot of emails asking me to elaborate on a few of them. Today, I wanted to talk about how tabs are objectively better than spaces. This won’t take long. Tabs let you define how big you want each indent to be, and spaces do not.
  • zagaberoo ( zagaberoo@beehaw.org ) 
    link
    fedilink
    arrow-up
    1
    ·
    3 years ago

    I am not, it’s easy to find examples where tabs first then spaces breaks down.

    • JackbyDev ( JackbyDev@programming.dev ) 
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 years ago

      That example is using tabs for both indentation and alignment. The article you linked even says not using tabs for alignment is a solution.

      • Do not use tabs for alignment. In such case given example should look like:
      fun foo x =
      --->let val abs = if x > 0
      --->              then x
      --->              else -x
      --->in
      --->--->(* ... *)
      --->end
      
      • zagaberoo ( zagaberoo@beehaw.org ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        Yes, but keep reading. That strategy is a pain to maintain especially across editors.

        • JackbyDev ( JackbyDev@programming.dev ) 
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 years ago

          Many styles are difficult to maintain, I’m not saying it is or isn’t. I’m saying that using only spaces for alignment will not let your alignment get messed up with various tabstops settings.

Programming@programming.dev

programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 120 users / day
  • 652 users / week
  • 1.68K users / month
  • 4.19K users / 6 months
  • 449 local subscribers
  • 28.8K subscribers
  • 2.95K Posts
  • 23K Comments
  • Modlog
  • mods:
  • snowe ( snowe@programming.dev ) 
  • Ategon ( Ategon@programming.dev ) 
  • UlrikHD ( UlrikHD@programming.dev ) 
  • bugsmith ( bugsmith@programming.dev ) 
  • Spyro ( Spyro@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code