←back to thread

2024 points randlet | 1 comments | | HN request time: 0.228s | source
Show context
theandrewbailey ◴[] No.17516370[source]
Python was my first programming language, ~15 years ago. The bracket- and semicolon-free syntax is beautiful and approachable to this day. Python is my go-to for writing data format conversion scripts. I wrote a random sentence generator in Python 10 years ago that gave me and my friends hours of entertainment.

Thanks, Guido, for the good times!

replies(1): >>17517645 #
fit2rule ◴[] No.17517645[source]
I can never get into Python and end up with as much passion as you. For me, its a very powerful and useful language - no doubt about it.

But the aesthetics of a whitespace language just don't jive with my 30+ years of experience writing code. No matter how many times I try over the past few decades, I just can't get passionate about writing Python code. I know its power, and I totally grok its value to our industry - but for me, Lua is just far more elegant, even if it doesn't ship with all of Pythons' goosebridles. Lua is my go-to scripting language; I only ever use Python if I have to - i.e. its enforced on me by others.

I really do try to get over this personal handicap, often enough, but the moment I have to start thinking about indentation I just lose all the passion and it starts feeling like a drag. What a dilemma, because I know it has been used for many, many great things .. I just wish I could get over my aversion to white-space'ing things all the time. I've tried editor after editor (well, expect the Python-specific things), but it just doesn't click.

Ah well.

replies(6): >>17517931 #>>17519165 #>>17519828 #>>17521140 #>>17521516 #>>17535913 #
patejam ◴[] No.17517931[source]
The indentation should be almost the same as any other language. Unless you have an aversion to consistent code-style.

Python whitespace was only annoying for me years ago when it still had trouble handling tabs and spaces in the same file, and you would run into literally invisible bugs. I haven't run into that in a long time, though.

replies(2): >>17518007 #>>17520705 #
rabidrat ◴[] No.17518007[source]
It's also basically impossible to cut-and-paste code from a web forum. Was that "else" from the inner or the outer "if"?
replies(7): >>17518208 #>>17518298 #>>17518902 #>>17518922 #>>17519764 #>>17521294 #>>17542022 #
1. int_19h ◴[] No.17519764[source]
How so? If the code was properly indented on the forum, it'll still be properly indented when you paste it. The only thing you'll need to do is to make sure that indentation of the entire pasted block is consistent with whatever's around it... but pretty much any editor these days, at least the ones meant for code, let you easily adjust indentation of an arbitrary selection (just highlight and Tab or Shift-Tab as needed).