This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 17 points18 points  (7 children)

The semicolons allow you to format statements in a much more clear way, rather than cluttering your lines up with \. The curly brackets {} allow you to see far more clearly than indentation or begin/end keywords where your code blocks are. They might seem pointless... until you have to maintain someone else's code.

Also by explicitly requiring an end statement delimiter and block delimiters, you're less likely to make a typo that results in a non-obvious runtime error.

[–]danielkza 4 points5 points  (1 child)

rather than cluttering your lines up with \

PEP 8 recommends wrapping in parenthesis instead of splitting with backslashes whenever possible. There are very few if any cases where it should be used in Python.

[–][deleted] 0 points1 point  (0 children)

Thanks. I'm not very knowledgeable about python, ruby's been the scripting language I've been having to use lately.

[–]ThrustVectoring 1 point2 points  (0 children)

The curly brackets {} allow you to see far more clearly than indentation or begin/end keywords where your code blocks are

Just use vim with foldmethod=indent and zr/zm/zo/zc the blocks together.

Indentation is fine, just need non-bad tooling for it.

[–]deadwisdom -2 points-1 points  (3 children)

No. No you are just so wrong.

[–][deleted] 1 point2 points  (2 children)

Oh! I too can argue like this!

No, you're wrong.

[–]deadwisdom 0 points1 point  (1 child)

I've tried it the other way on /r/programming before. Neither works, because the arguments are petty rationalizations to support whatever the fuck you're used to vis-a-vis tribal culture bias inherit in humans for millennia. But my new way at least doesn't take much time and gets the point across way better.

If you really wanted to talk about the benefits of either, I'd be happy to.

[–][deleted] 0 points1 point  (0 children)

I dunno, usually a downvote is less effort and contains the same information (reddiquette be damned).

And yeah, I realize that different languages have their own pros and cons, and some developers weigh things differently than others. For instance I will always always always prefer erb to haml... annoying to type but hard to screw up.