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

> Language choice should be optimized to make it easy to read other people's code and to prevent mistakes from getting into production. Python is not near the top of the pack in those dimensions.

I think most people would definitely disagree with you on the first point. As far as languages go, Python is probably one of the most readable ones out there. It's often even compared to pseudocode because well written Python reads like it.

The latter is a valid point, but assumes all code you ever write is made for production. That's just plainly false. Python is great for tooling, automation, prototyping and many other smaller scale non-production usage. That's where the low-barrier of entry really shines.




> As far as languages go, Python is probably one of the most readable ones out there.

I could not disagree more. Python (as most people write it) has many things that make it less readable:

1. Semantic whitespace (absolute disaster for readability, almost as bad as YAML)

2. Choosing to "save keystrokes" by removing helpful visual cues that other languages have, like parentheses, semicolons, and brackets -- these things make scanning much easier

3. As most people write it, very few line spaces, making Python look like an unbroken run-on sentences instead of nice blocks of code

I've been writing and maintaining code for 26 years, and I've worked a lot with C#, JS/TS, Python, and PHP. I know other languages but haven't spent as much time with them.

Out of those, PHP is ironically the most readable because of its $ variables, and then the order is C#, TS, JS, and then Python. Python is hard to scan and just looks like a brick wall at first glance.


Do you honestly think "readability" is only about whitespace and semicolons?

Compare

    namespace HelloWorld
    {
        class Hello {         
            static void Main(string[] args)
            {
                System.Console.WriteLine("Hello World!");
            }
        }
    }
to

    print("Hello World!")
and

    std::ifstream t("foobar.txt");
    std::stringstream content;
    content << t.rdbuf();
to

    with open('foobar.txt') as file_object:
        content = file_object.read()
How can you honestly look at any of that and claim Python isn't far more readable. It literally reads like English. "With open foobar.txt as file object, content equal file object read". Compare that to whatever monstrosity the ifstream string stream << rdbuf crap is...


> It's often even compared to pseudocode because well written Python reads like it.

This is absolute rubbish. Go and find me a piece of application code which isn’t procedural math/data manipulation, give it to someone completely new to it and see how easily they (don’t) comprehend it.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: