this post was submitted on 05 Sep 2023
165 points (79.6% liked)

Programming

17432 readers
257 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] maor@lemmy.org.il 5 points 1 year ago (1 children)

I guess they were referring to formatting other than tabs, like place of brackets and line length, which sounds like a neat idea

[–] dukk@programming.dev 5 points 1 year ago (1 children)

...until you start using languages where whitespace is the only way to distinguish code blocks. (Most notably Python.)

[–] aes@programming.dev 2 points 1 year ago

It was harder to explain why picking on Python for this is dumb, before gotofail... (Not saying that's what you're doing, but it feels close, so this is relevant.)

For whitespace, my rule is this: If any level of indentation depends on the length of any word or name, you're doing it wrong. If using a more descriptive name causes indentation where previously there was none, that's fine, but if moving the opening parens causes the interior to be indented more, less so. (Yes, Golang's structs)