Live data from Hacker News

Python overtakes Java to become the second-most popular programming language

techrepublic.com

81–90 of 357 posts

Re: Python overtakes Java to become the second-most popular programming language

#81
post #70

Earlier quoted context omitted.

I have a decorator to add support for slots: https://github.com/ericvsmith/dataclasses/blob/master/datacl... (although I'll admit I haven't tested it in a while). The reason it's not an option by default is because it would be the one case where the decorator would have to return a new class, and I didn't want to do that on the first version. As it is, @dataclass just modifies an existing class. I might bite the bull…

I believe this is the example where dataclasses could have supported __slots__ better with a metaclass? Thanks for working on dataclasses :) - as I said, it's my #1 new feature in Python.

Maybe that would have worked better with a metaclass.

But still, I think not using a metaclass is the more flexible design. Maybe I'll add the "add_slots" behavior into the @dataclass decorator in 3.10, even though it would need to return a new class. At least it could be well documented, and I doubt it's a concern for most people.

> Thanks for working on dataclasses :) - as I said, it's my #1 new feature in Python.

I'm offended! I also wrote f-strings, but maybe that's not considered new anymore. In any event, you're welcome!

Re: Python overtakes Java to become the second-most popular programming language

#82
post #19

Earlier quoted context omitted.

Just curious, what other server side languages do you feel have a better library ecosystem than Node/JS?

PHP has a solid library ecosystem, especially around Laravel, which is what I know best.

Most libraries exposed in some sort of package repository in PHP land are pretty bad. In terms of quality, but also in terms of documentation (frequently not there, partially there or wrong). It's not even rare to find libraries wrapping things with only half of the expected functionality implemented.

To say nothing of trying to get patches into the core. Be prepared to wait months for any response at all, every time getting the feedback that there is some new minor problem (or even worse, a "this needs to be talked about" without any followup).

It's not a healthy ecosystem. For that you require high-quality core libs, a strong developer ecosystem (that doesn't mean a lot of devs, it means good ones) and a culture of third-party libraries being few but high-quality. Anything else is going to end up pissing you off, guaranteed.

Re: Python overtakes Java to become the second-most popular programming language

#83
It is biased towards (European) industry but https://stackoverflow.com/jobs is a good metric on language demand.

Since I started to follow it systematically (mid-2019), the trends I perceive are: Java or Scala -> Kotlin, JS -> Typescript, Angular -> Vue. Growth of (non-web) Python, React, Go and even PHP. Besides Kotlin, mobile tech demand seems stalled (Swift, React native, etc). Frontend demand is shrinking.

Re: Python overtakes Java to become the second-most popular programming language

#84
post #42

Earlier quoted context omitted.

Just curious, what other server side languages do you feel have a better library ecosystem than Node/JS?

Python. The performance lacks somewhat and the debugging tools are not as mature as JVM's. But the libraries, frameworks, and overall development productivity are great.

Some of the newer ASGI frameworks are actually pretty good performance-wise. I haven't touched Node.js in years and recently needed a backend for an iOS project with a lot of geoJSON processing, used FastAPI and found it excellent. While Python is far from perfect it opens you up to a diverse ecosystem from AI/ML/Geo/science communities.

Re: Python overtakes Java to become the second-most popular programming language

#85
post #60

Earlier quoted context omitted.

You are probably using TypeScript. Try vanilla Node/JS if you want a faster Rails.

What does typescript have to do with speed?

Static typing can be a bitch to get right. There are quite a few weird cases where it would be natural to write without types, but tricky once you introduce static typing and want to keep pleasing the TypeScript type checker, usually involving generics.

Re: Python overtakes Java to become the second-most popular programming language

#86
post #4

I'm surprised TIOBE is still taken seriously these days. It certainly sort-of correlates with popularity but it's a bullshit measure.

I think they factor in legacy stuff. There are lots of VB jobs in my area from companies desperate to maintain whatever horrid internal apps they built up 20 years ago.

Along the same lines, IoT depends heavily on C and even stepping out of that, pretty much every piece of silicon requires extensive C code to be written around it.

I still wonder about JS though. Billions of websites with JS and the JS gets rewritten every few years (or less during the framework wars period).

Re: Python overtakes Java to become the second-most popular programming language

#87
post #2

We need to start ranking languages based on what people use them for. Python is certainly #1 in ML, for example, but far from #1 in web. I had a "which stack" argument with a client recently for a web server processing tons of data. He wanted to use Node (which I hate, but also use when performance doesn't matter because TypeScript is so good). I showed him that the Node library ecosystem is actually pretty weak (man…

Just curious, what other server side languages do you feel have a better library ecosystem than Node/JS?

I think basically every majorly used general programming language has better libraries than Node - which becomes problematic if your application needs to do something that you would normally expect to get by using a library - but the thing that Node has which in my estimation makes it better than almost every other language is I don't have to context switch when changing languages in between backend and frontend.

Re: Python overtakes Java to become the second-most popular programming language

#88

Earlier quoted context omitted.

JVM based languages? Also I like the .NET ecosystem as it comes with batteries included and is quick to develop with.

I'm finding that JVM is really starting to look threadbare as a web development language. I haven't tried Spring Boot, so I can't speak to that, but gather that a lot of people like it. Otherwise, though, it's kind of a mess of too @#$% many options and no clear winner aside from the legacy stuff that nobody actually enjoys working with on the flagship language, an alternative language that was initially promising fo…

Everyone has different ideas about what matters; I care about continuity and stability. I cannot do a monthly dance of 'library blah is no longer maintained, please try library vlah which, by the way, is completely incompatible API wise!'. I need stuff that runs fine in a decade and where the maintainers respect backwards compatibility. I have not been let down by the past decades of JVM (and PHP but I never used many libraries there, so not a good example) and last decade of .NET in that regard. I carefully make sure i know my dependencies (read the code, check maintainers; ecosystems that have millions of tiny libraries cannot work for me; I like my sleep). Things simply work and they work, without much issues, after major upgrades of libraries and runtimes throughout the years. My business goals clash with fast moving things; my clients don't want them and I don't want to maintain them. And yet my software runs under the hood of 'hip' companies; they build fast moving stuff on top of it; I like it that way.

Re: Python overtakes Java to become the second-most popular programming language

#89
post #85

Earlier quoted context omitted.

What does typescript have to do with speed?

Static typing can be a bitch to get right. There are quite a few weird cases where it would be natural to write without types, but tricky once you introduce static typing and want to keep pleasing the TypeScript type checker, usually involving generics.

Types don’t affect runtime performance unless you’re changing the algorithm. Maybe you’re arguing that correctly annotating certain algorithms is harder than switching to a slower but easier-to-annotate algorithm, but I’m very skeptical of this, especially since (in my experience) well-typed programs seem to be more efficient (easier for the compiler to optimize types that don’t change at runtime than those that do).

Re: Python overtakes Java to become the second-most popular programming language

#90
post #6

Earlier quoted context omitted.

That C is supposed to be the most popular language makes the whole ranking questionable. The stackoverflow ranking[1] corresponds much more to my own experience in real life. [1] https://insights.stackoverflow.com/survey/2020#most-popular-...

I'm mostly a C++ and Python programmer by a large margin, but I only ever visit Stackoverflow for Javascript questions or Linux distribution bugs/misfeatures. This only represents the sad state of Javascript documentation, I think.

You been to MDN? their JavaScript Documentation is impeccable? What are you referring to? There are tons of JS resources available? Or are you referring to 3p libraries which vary in terms of their documentation and can be contributed by anyone?
Post reply on HN