top | item 45440333

(no title)

larrik | 5 months ago

I'm surprised at the negative comments about Python here. Python has been my favorite language since I learned it, and nothing else has come close to it.

I'm currently on pure JS project (node and vue) and I'm constantly fighting with things that would be trivial in python or django. Also getting into .NET world and not impressed with that at all.

I know folks like Go, but in decades of being a software consultant I've come across zero companies using it or hiring for it.

discuss

order

zahlman|5 months ago

There are negative comments about Python every time there's an opportunity presented. There are lots of positive comments too.

The wisecrack goes that Python is the second-best language for everything. I think this is clearly false: it is the best language for soliciting opinionated discussion on a forum.

nawgz|5 months ago

Care to give some examples of those trivial things you’re fighting?

larrik|4 months ago

Well Here's one:

In NodeJS the most popular ORM is Sequelize. Sequelize struggles with TypeScript, the code to use is extremely verbose (vs Django), and the migrations are simplistic at best. There are other ORMs, but you usually gain TypeScript support at the expense of good migrations (which range from rough SQL-script-only support to literally nothing). Schema migrations are one thing, but if you want to do a data migration that uses business logic, in Django you can potentially just bring in your business code directly into a migration, and you can also explicitly set pre-requisites rather than having to order the filenames (which is what everything else seems to use).

Also in NodeJS if you miss an `await` in your controller, the entire server can crash if that call fails.

That's Node vs Django, though, which isn't completely JS vs Python, but it also really is.

Coming from Python, JS has constant surprises, where code works in one place and not another (in the same project!) due to reasons I don't always understand around ES version and configuration. Everything in JS feels like a hack job, built on a pile of someone else's hackjobs.

Likewise, if I want to know how something in Python works, I just look at the source. I rarely even look at official documentation because the code is right there. That's not a reasonable thing in JS, frankly.

But really the worst part is that I do a ton of "try and test" development, where debugging is hit or miss and console.log is everywhere. In Python, I can just write the code live in the shell/iPython, and then past the working code back into my IDE. This ends up being a huge timesaver.