this post was submitted on 28 Feb 2024
636 points (97.2% liked)

Programmer Humor

19537 readers
511 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
636
wait what (pawb.social)
submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 8 months ago
[–] [email protected] 3 points 8 months ago

Between this and their declaration to stop using C tells me they're ramping up for cyberwar.

[–] [email protected] 12 points 8 months ago* (last edited 8 months ago) (4 children)

But like... Correct me if I'm wrong but in my experience tab does not always equal 4 spaces.

E: thanks all. I didn't fully understand.

[–] [email protected] 1 points 8 months ago

Four? Uh oh...

[–] [email protected] 20 points 8 months ago (1 children)

That's why it's also a big accessibility feature. With big font sizes, four spaces are distracting but you can configure tabs to show up as one character, which is way more reasonable with font sizes larger than usual

[–] [email protected] 8 points 8 months ago

I had a colleague that is legally blind in my second real job. The dude is brilliant (and hilarious) but these things would significantly enable or screw up his productivity. I have always felt fortunate to have had direct butt in seat exposure to the importance of accessibility at such a young age.

[–] [email protected] 43 points 8 months ago

That's one of the benefits of using tabs. Some people might like 4 spaces for indentation, whereas others like 2 spaces. If you use tabs, you can configure your editor to use whatever tab size you want, and they're just stored as tab characters in the file.

Tabs for indentation, spaces for alignment (eg for ASCII art).

[–] [email protected] 9 points 8 months ago

You’re misunderstanding. In this case it means “one tab character” instead of “four space characters”.

[–] [email protected] 9 points 8 months ago
[–] [email protected] 42 points 8 months ago

As a fan of tabs I see this as an absolute win

[–] [email protected] 42 points 8 months ago (1 children)

Let's just avoid indentation at all (jk).
Always remember:

[–] [email protected] 8 points 8 months ago

“He's me.” - Obi Wan Kenobi

[–] [email protected] 21 points 8 months ago (3 children)

The correct answer is, was and always has been elastic tabstops

[–] [email protected] 1 points 8 months ago

I've been hoping someone would try that!

[–] [email protected] 2 points 8 months ago

Wow this site is hard to read, at least on mobile (haven't tried on my PC). The line-height is too small.

[–] [email protected] 4 points 8 months ago (2 children)

Any ides have support for this? I feel like I've been waiting forever.

[–] [email protected] 6 points 8 months ago (1 children)

Looks like there's an emacs package for elastic tab stops.

[–] [email protected] 5 points 8 months ago

Of-fucking-course there is.

[–] [email protected] 2 points 8 months ago* (last edited 8 months ago) (1 children)

Essentially no. I wish so badly that this had taken off.

Edit: as noted on the website, various plug-ins that attempt support are in fact not correct.

[–] [email protected] 1 points 8 months ago (1 children)

What do you mean? There's a ton of working plugins listed on the website for many editors.

[–] [email protected] 2 points 8 months ago

Sorry, my phrasing was sloppy. Most popular IDEs and editors do not have a plug-in or setting that implements elastic tabstops correctly. In particular, there's no implementation for vim, emacs, VSCode, eclipse, or any JetBrains IDEs. (I had forgotten that there's one for Visual Studio and one for Notepad++.)

load more comments
view more: next ›