1323
you are viewing a single comment's thread
view the rest of the comments
[-] knobbysideup@lemm.ee 23 points 2 years ago* (last edited 2 years ago)

Programming languages that use white space to delimit structure are annoying at best. I get annoyed at yaml too, but I'm ok once I have a few templates set up.

[-] corytheboyd@kbin.social 21 points 2 years ago

YAML comes with its own unique pains in the ass https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell

These things actually matter, come up often enough to actually be annoying, and are a bit difficult to explain and learn into people. You’re basically fine if you just string quote everything that you can, but nobody does that.

[-] lemmylommy@lemmy.world 7 points 2 years ago

That was interesting. And possibly the most Dutch name I have ever heard of.

[-] Scribbd@feddit.nl 3 points 2 years ago

Is Dutch name. Source: am Dutch.

[-] mexicancartel@lemmy.dbzer0.com 5 points 2 years ago
[-] AntEater@discuss.tchncs.de 2 points 2 years ago

Tabs suck. Use a real editor and spaces work fine.

[-] mexicancartel@lemmy.dbzer0.com 3 points 2 years ago

Why tabs suck? Explain.

Tabs are neat.

Does you app have too many nested functions?

Use tab width = 2

Do your app have too less nested functions?

Use tab width = 8

Is your app having average number of nested fns?

Use tab width = 4(mostly default)

And all theese can happen without modifying a single byte in the source file, unlike spaces!

[-] merc@sh.itjust.works 5 points 2 years ago

Except that you have to either indent with only tabs or indent with only spaces. Any time you mix tabs and spaces you are just asking for disaster.

If you indent with only tabs you can't align things except on tab boundaries. If you have a function that takes 10 parameters and want to do it on multiple lines, the alignment of the extra parameters is going to be ugly.

If you indent with only spaces, you can indent things so that all the parameters line up directly underneath the parenthesis, for example.

[-] mexicancartel@lemmy.dbzer0.com 1 points 2 years ago

I agree we shouldn't mix tabs with spaces. But use tabs always. I could line up parameters together but may not be just under parentheris, and it looks good and readable for me

[-] merc@sh.itjust.works 1 points 2 years ago

I think it looks like ass, so only spaces for me.

[-] PreachHard@mander.xyz 1 points 2 years ago* (last edited 2 years ago)

Yeah who tf isn't using tabs as spaces, it isn't 2010

this post was submitted on 05 Sep 2023
1323 points (97.4% liked)

Programmer Humor

21290 readers
879 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 2 years ago
MODERATORS