re: Python: Still in favor? VIEW POST

VIEW FULL DISCUSSION
 

Python has a special place in my heart, because it's the language I learnt how to code with about 6 years ago. That said, it's been my language of choice for many tasks since then.

I'm not saying it's the best language for those tasks (if there's even such a thing as a "best" language"), but for what I've been doing most recently (backend web development, scripting, automation, prototyping), Python has been a very strong ally.

I also enjoy those soothing moments when you write something and it just reads like pseudocode. Readability is one of the things I like the most in Python, among other things like ease of use, expressiveness or the vast ecosystem of libraries.

There are, however, some aspects I'd rather have not to deal with.

Some time ago, I would have said its dynamic typing put a high cognitive load on the developer. However, since I discovered type annotations (shameless related blog post plug), I've been really happy with what they provide, as I don't feel the need for the static typing burden.

However, the Python packaging system can be quite a pain. There is no single way of doing and the documentation is sometimes misleading. You have to think about setup.py, eggs vs wheels vs tarballs, etc… Honestly, for the beginner package developers like me (I've written my first package a month ago), that's a lot to ingest. In contrast, packaging and shipping an NPM module is a matter of filling up the package.json file.

As for Django, it's actually become go-to framework (often combined with the Django REST Framework) when I have to manage stuff (read: deal with a relational database) and have user accounts. It's got so many good practices built-in.

In contrast, if I have to build a quick API that does or computes stuff, I'd rather go with Falcon (I ditched Flask for it).

That said, I almost never use Python frameworks for frontend anymore — I must say templating systems just seem out of date now, and I prefer to use specialised JS frameworks for that.

code of conduct - report abuse