Live data from Hacker News

I'm switching to Python and actually liking it

cesarsotovalero.net

391–400 of 718 posts

Re: I'm switching to Python and actually liking it

#391
post #177

Earlier quoted context omitted.

I coded happily in python for many years and fell out of love with it. It doesn’t ship with a first party package manager so you got the community trying to fill this gap. Use any other language with good tooling like golang or rust and it is a breath of fresh air. Python used as an actual PL is a footgun because it’s dynamic scripted. (Don’t tell me about using tools X, Y, Z, mypy, …) You essentially become the comp…

> A programming language that’s only good for What a bunch of crap. It's so trivial to show very popular and useful programs written in Python that far exceed this number I'm not even going to do the work. What a lazy criticism.

Hi rsyring, I made this comment out of experience.

As python projects grow and grow, you need to do lots of support work for testing and even syntactic correctness. This is automatic in compiled languages where a class of issues is caught early as compile errors, not runtime errors.

Personally I prefer to move more errors to compile time as much as possible. Dynamic languages are really powerful in what you can do at runtime, but that runtime flexibility trades off with compile time verification.

Of course, every project can be written in any language, with enough effort. The existence of large and successful python projects says nothing about the developer experience, developer efficiency, or fragility of the code.

Re: I'm switching to Python and actually liking it

#392

Maybe I'm the only one that finds Python simultaneously verbose and lacking? Either you need 500 dependencies to do something in a simple way, or you need dozens (if not hundreds) of lines to do trivial things. I avoid writing Python because there's so much bullshit to add. Much prefer Perl, I can actually get things done quickly. Python feels like programming for the sake of programming.

I have a bunch of zero dependency projects. You can get a lot done with the standard library and single file projects which you can run on most systems without needing to do anything except curl it down and run it since Python is available.

For example here's a ~2k line Python project which is a command line finance income and expense tracker: https://github.com/nickjj/plutus/blob/main/src/plutus

It uses about a dozen stdlib modules.

About 25% of the code is using argparse to parse commands and flags. With that said, I tend to prefer code that yields more lines for the sake of clarity. For example this could technically be 1 or 2 lines but I like each parameter being on its own line.

    parser_edit.add_argument(
        "-s",
        "--sort",
        default=False,
        action="store_true",
        help="Sort your profile and show a diff if anything changed",
    )

Re: I'm switching to Python and actually liking it

#393

I keep meaning to write something like this but exploring the “how simple can you make it” angle - a lot of my world is kube (which is great in the right scenario) but could you shave complexity out of a stack designed for solo dev rapid iteration: e.g. rather than: > It’s important not to do any heavy data processing steps in the project-ui … we keep the browser application light while delegating the heavy lifting a…

if you want to serve HTML from the backend, why not use FastHTML then ;-)

i experimented with it, i’m a fan of the concept. Ironically the bit i thought id like most (swap jinja extends shenanigans for just composing functions or callables more generally) is the bit that i didnt warm to. I dont really know why, on paper it ticks boxes for me. In practice i felt slow.

Re: I'm switching to Python and actually liking it

#395
post #287

> I would like to have a tool that generates the project structure for me, but I haven’t found one that fits me yet. I recommend cookiecutter for this. I have a few templates I've built with that which I use frequently: python-lib: https://github.com/simonw/python-lib click-app: https://github.com/simonw/click-app datasette-plugin: https://github.com/simonw/datasette-plugin llm-plugin: https://github.com/simonw/llm-p…

Am I the only one who actually likes setting up new projects? I don't want to automate that.

Re: I'm switching to Python and actually liking it

#398
post #396

Funnily enough, I made the opposite switch recently, and am also liking it. My thoughts about python here: https://calvinlc.com/p/2025/06/10/thank-you-and-goodbye-pyth... Next time I get into Python I’ll try uv, ruff, ty.

I switched from Python to JS for backend stuff a while back, thoroughly enjoying it. I agree that "Python installation and package management is broken," but the async stuff was the biggest improvement to productivity. Yes I know Python got asyncio, but there's a big difference between having one well-accepted way of doing things vs multiple competing, incompatible ways, where the good one has the least momentum.

The rest is small stuff that adds up like Py whitespace scoping, or Py imports somehow not taking relative paths, or JS object syntax is nicer: https://news.ycombinator.com/item?id=44544029

Re: I'm switching to Python and actually liking it

#399

Earlier quoted context omitted.

The syntax is exactly two, not 2-5.

I think the point was: who can know by looking at it.

I mean, maybe you should use a font that doesn't make it hard to figure that out. Next you're gonna say we should ban 0s and Os, Is and ls, because your font doesn't allow you to figure out which one it is.

Re: I'm switching to Python and actually liking it

#400

Earlier quoted context omitted.

No and no. I don't know how you even get to this level of "making it harder for yourself". Say you want to use a specific version of python that is not available on Ubuntu. 1. Install build dependencies https://devguide.python.org/getting-started/setup-building/#... 2. Download whichever Python source version you want, https://www.python.org/downloads/source/ . Extract it with tar 3. run ./configure --enable-optimiza…

Virtual environments are useful for isolating dependencies for different projects, not just isolating the interpreter. (I mean, except on Windows, your venvs default to symlinking the interpreter and other shared bits, so you aren't really isolating the interpreter at all, just the dependencies.)

AFAIK, it's the same even on POSIX, when you create a venv, "./bin/python" are symlinks and the pyvenv.cfg has a hardcoded absolute path of the current python interpreter the venv module was using at the time of creation. It really doesn't isolate the interpreter.

(also one of the reasons why, if you're invoking venv manually, you absolutely need to invoke it from the correct python as a module (`python3.13 -m venv`) to make sure you're actually picking the "correct python" for the venv)

Post reply on HN