1005
C++ Moment (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] HopFlop@discuss.tchncs.de 7 points 6 months ago

Why would I use spaces if I use tabs? Also, it seemd like a huge waste of time hitting the space bar so many times...

[-] merc@sh.itjust.works 7 points 6 months ago* (last edited 6 months ago)

Why would I use spaces if I use tabs?

To comply with Python's best practices:

https://peps.python.org/pep-0008/

Also, if you work on the Linux Kernel, you'll see a mix of tabs and spaces:

https://elixir.bootlin.com/linux/latest/source/block/bfq-iosched.c#L390

Also, it seemd like a huge waste of time hitting the space bar so many times…

You use an editor that doesn't auto-indent?

[-] FlorianSimon@sh.itjust.works 3 points 6 months ago

I assume this was a joke 😁

[-] BeardedGingerWonder@feddit.uk 2 points 6 months ago

I use vi without syntax highlighting.

[-] FlorianSimon@sh.itjust.works 1 points 6 months ago

Please don't hack me, mister FBI

[-] BeardedGingerWonder@feddit.uk 1 points 6 months ago

To be fair you can totally bind an arbitrary number of spaces to tab in vi. I'll dig out the syntax highlighting file some time. Oh and I use vim really.

[-] FlorianSimon@sh.itjust.works 2 points 6 months ago

I do use neovim myself too 😁

this post was submitted on 28 Feb 2024
1005 points (97.0% liked)

Programmer Humor

32050 readers
1463 users here now

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

Rules:

founded 5 years ago
MODERATORS