1318
you are viewing a single comment's thread
view the rest of the comments
[-] ipha@lemm.ee 70 points 1 year ago

Better than counting curly braces.

[-] sentient_loom@sh.itjust.works 47 points 1 year ago
[-] wols@lemm.ee 15 points 1 year ago

Yup.

Spaces? Tabs? Don't care, works regardless.
Copied some code from somewhere else? No problem, 9/10 times it just works. Bonus: a smart IDE will let you quick-format the entire code to whatever style you configured at the click of a button even if it was a complete mess to begin with, as long as all the curly braces are correct.

Also, in any decent IDE you will very rarely need to actually count curly braces, it finds the pair for you, and even lets you easily navigate between them.

The inconsistent way that whitespace is handled across applications makes interacting with code outside your own code files incredibly finicky when your language cares so much about the layout.

There's an argument to be made for the simplicity of python-style indentation and for its aesthetic merits, but IMO that's outweighed by the practical inconvenience it brings.

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

But, nobody ever copies code from Stack Overflow!

load more comments (5 replies)
load more comments (25 replies)
this post was submitted on 05 Sep 2023
1318 points (97.3% liked)

Programmer Humor

19594 readers
550 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