F
0

Did my first project in Python after 6 months of JavaScript - huge difference in readability

I spent the last half year learning JavaScript for web stuff and finally gave Python a try last week for a data sorting script. Python took me like 3 lines to do what took 15 in JS, and I didn't even need to use curly braces or semicolons. My code looked cleaner in like 30 minutes than my JS projects ever did after 5 hours of debugging. Anyone else switch languages and notice a massive shift in how easy it is to follow your own code?
2 comments

Log in to join the discussion

Log In
2 Comments
charlieh74
charlieh7414d ago
Man, Python really spoiled me after wrestling with JavaScript for months.
10
white.keith
charlieh74 said Python spoiled him, but I'd argue it actually spoils good coding habits. When you write 15 lines in JS you're forced to think about structure and edge cases, Python's brevity can make you lazy about that. My Python scripts always break in weird ways that my longer JS ones don't.
5