this post was submitted on 21 Jun 2023
103 points (99.0% liked)

Programmer Humor

33619 readers
17 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 21 comments
sorted by: hot top controversial new old
[–] Anarch157a@lemmy.world 7 points 2 years ago

Create a language where tabs are used for indentation while comments are formed by one space character at the beginning of a line, followed by a tab. Exactly eight spaces at the beginning of a line means that line is continuation of the previous one.

Maybe I'll start an Anarchy Programming sublemmy.

[–] Chet_Awesomelad@kbin.social 4 points 2 years ago (1 children)

I think you put those images the wrong way around, pal 😠

[–] shiftenter@kbin.social 1 points 2 years ago

I agree, the others are wrong.

[–] Eavolution@kbin.social 3 points 2 years ago (1 children)

The only solution is to use a curly brace language and write everything on one line.

[–] draggeta@kbin.social 3 points 2 years ago (1 children)

The real question is spaces around curly braces or not?

[–] T156@lemmy.world 2 points 2 years ago

Have spaces around curly braces modify the behaviour. That way, you can incorporated both.

[–] T156@lemmy.world 3 points 2 years ago (2 children)

That's why you get the best of both worlds, and combine them to use tabspaces. Everyone will hate you equally, achieving true equality in the proecss.

[–] mundane_party@lemmy.world 3 points 2 years ago

Tab characters are space efficient and configurable for each person in their editor. Space characters are consistent between developers.

Solution: each tabspace indent is a random width, making it both inconsistent and non-configurable. Also, each character is the size of at least four regular characters, so it’s not even space efficient

[–] rooster_butt@lemmy.world 1 points 2 years ago

Honestly the best solution is tabs for indentation and spaces for alignment.

[–] astrsk@kbin.social 2 points 2 years ago (1 children)

I prefer to use three alt+255

[–] gvasco@discuss.tchncs.de 1 points 2 years ago

A bit useless if there's no character in front of the lead

[–] Mike835@kbin.social 2 points 2 years ago (1 children)

I've always found it weird people call it white spacing when most coders use night mode on their ide, shouldn't it be black space?

[–] zexu@lemmy.ml 1 points 2 years ago

😂😂😂

[–] duncesplayed@lemmy.one 2 points 2 years ago

Just set your tab width to 1. No more argument now.

[–] Dirk@lemmy.ml 2 points 2 years ago (1 children)
[–] gvasco@discuss.tchncs.de 1 points 2 years ago

I like it, at least it's a prime number!

[–] drew_belloc@programming.dev 1 points 2 years ago

Finally someone that speaks the hard truth that we need to hear

Hard to imagine how anyone could be so wrong :P

[–] DonjonMaister@programming.dev 1 points 2 years ago

I have no problem with either. But I do have a problem with people who use the space bar instead of the tab key.

[–] tr00st@lemmy.tr00st.co.uk 1 points 2 years ago

As a JS developer, I prefer to use semicolons for indentation.

[–] Lachy@lemmy.world 1 points 2 years ago

My indentation is secretly the actual program written in the whitespace programming language.