this post was submitted on 05 Sep 2023
158 points (79.0% liked)

Programming

17672 readers
139 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 [email protected]



founded 2 years ago
MODERATORS
(page 4) 18 comments
sorted by: hot top controversial new old
[–] [email protected] -1 points 1 year ago* (last edited 1 year ago)

I'm tinkering with a whitespace language and prefer using 1-space rather than 2. I don't really like the double character for 1 level. Is that weird?

Tabs are forbidden though I could use tabs with a (1-line) per-file code filter for the compiler to turn 1 tab into 2 spaces, and that might be easier when working with others (though I don't know how it would be seen, especially needing to change editor tab behavior).

[–] [email protected] -1 points 1 year ago
[–] [email protected] -3 points 1 year ago (5 children)

That’s all well and good if everyone uses editors you can configure to a certain standard all the time. Then tabs all the way.

Unfortunately that’s not reality for everyone.

load more comments (5 replies)
[–] [email protected] -4 points 1 year ago (2 children)

Tabs let you define how big you want each indent to be, and spaces do not.

Spaces can too: Simply use more or less of them, to taste.

I have ADHD. Two spaces per indent makes it damn near impossible for me to scan code.

Then use four, or six, or eight, or 20. Hell, most code I've seen uses four spaces per indent anyway.

[Re: braille]

Surely there's an editor out there that will automatically display indent spaces as a tab character. Or failing that it seems like it would be rather trivial create a program to convert n spaces to tabs, and vice versa.

load more comments (2 replies)
load more comments
view more: ‹ prev next ›