Hacker News new | past | comments | ask | show | jobs | submit login

Readability. The most important thing for code is to be comprehensible by developers. Python has several factors contributing to readability. White space as syntax is the most obvious thing. More than that, unlike Perl which has more than one way to do things Python tends to have one or maybe two canonical ways of accomplishing common tasks. This makes it easier to navigate code without having much experience. Python was also good at interfacing with existing libraries from the start so a lot of work got scripted quickly in Python using high powered C libraries. Arguably being able to work with popular C interfaces was yet another factor contributing to generally high readability of code.



I agree the language is very readable overall but I find the whitespace based syntax less readable and practical compared to just using curly braces. Editors can color matching pairs, let me jump between start and end of a scope, select all lines between two braces etc and all that just doesn't work in Python. Also I find it more difficult to see where a scope ends. It has upsides too and is not a huge deal but I often wonder why people prefer this so much.

Imho the reason for Python's success is mainly how easy and quick it is to learn, and how little time it takes to get something running. That alone removes so much frustration and perceived effort.


Try turning on indentation guides in your editor, they help to visualize scope.

If you are moving around large blocks often, well maybe they are too big? There are linters that can help with that kind of thing.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: