this post was submitted on 05 Sep 2023
156 points (78.9% liked)

Programming

19347 readers
151 users here now

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



founded 2 years ago
MODERATORS
(page 2) 50 comments
sorted by: hot top controversial new old
[–] redempt@lemmy.world 6 points 2 years ago (5 children)

why don't we store code unformatted and have everybody's IDE display it with their preferred format applied? it would make everything easier and stop people bickering over pointless things.

load more comments (5 replies)
[–] Sigmatics@lemmy.ca 6 points 2 years ago

Seems there's not much else going on

[–] skulbuny 6 points 2 years ago (1 children)

laughs in lisp

Nah, I'll keep on sticking with spaces or whatever the language's formatter uses. Ain't no way am I mixing tabs and spaces, will just stick with spaces.

[–] sekhat@lemmy.temporus.me 3 points 2 years ago (2 children)

I used to be a tabs guy, somepoint over time, especially when I realized some of the edge cases I have in formatting only remain consistent when using spaces, I switched.

load more comments (2 replies)
[–] 30p87@feddit.de 5 points 2 years ago

Ah yes I understand now!

[–] TheCee@programming.dev 3 points 2 years ago* (last edited 2 years ago) (2 children)

Original poster is right by all accounts, of course. Now, let's come up with exotic significant indentations.

function xyz(a, b):
|   var x = 2

|   if true:
|   |   do_something()
|   else:
|   |   do_something_else()

|   anyway()

Pro: Your editor no longer needs to implement indentation hints.

Con: Looks obstructive if not highlighted like an indentation hint.

Your turn.

load more comments (2 replies)
[–] Vince@feddit.de 3 points 2 years ago* (last edited 2 years ago)

I thought it was a non-issue that tooling should take care of anyway until stackoverflow published this:

https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/

Spaces all the way

load more comments