1009
C++ Moment (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] Dirk@lemmy.ml 77 points 8 months ago

Python: So you used spaces and tabs for indentation? NOW DIE!

[-] WhiteHawk@lemmy.world 47 points 8 months ago

Mixing spaces and tabs should be a warcrime.

[-] merc@sh.itjust.works -5 points 8 months ago

Find me anyone who claims they use tabs for indentation, and I bet I'll find at least one case where they're using both tabs and spaces.

The only safe way to avoid war crimes is to avoid tabs.

[-] HopFlop@discuss.tchncs.de 7 points 8 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 8 months ago* (last edited 8 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?

load more comments (14 replies)
load more comments (15 replies)
load more comments (21 replies)
this post was submitted on 28 Feb 2024
1009 points (97.0% liked)

Programmer Humor

32512 readers
409 users here now

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

Rules:

founded 5 years ago
MODERATORS