Live data from Hacker News

Python overtakes JavaScript as most questioned language on StackOverflow

globalapptesting.com

151–160 of 166 posts

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#151
post #104
post #99

Seem to me that Python has won. What I mean by that is that it is used almost everywhere and there is almost no compelling reason to use anything else. You want web? Django, plus a million other frameworks, all well tested and documented. Machine learning? Tensorflow, Keras or PyTorch. Scientific computing? Numpy. For the last two decades people have complained about (C)Python not being multi-threaded, not jitted, no…

There are plenty of compelling reasons to use other languages. Macros, types, threads, interfaces, lambdas, tail calls etc. But what matters in this world is short term profit. Python is easy to get started with, has a ton of frameworks than can be duct taped into semi-working software by mostly anyone and is taught in many schools.

While python does lack in many areas i think your list is a bit off. For macros, Python is one of the most meta-programmable language ever (for better or worse). Types, interfaces and lambdas exist. Threads also, caveat GIL, but also multiprocessing.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#152
post #86
post #6

Earlier quoted context omitted.

15 years of Python here, started in 2.4. Day to day Python is not more complicated to use. It's actually easier due to many bugs fixes, quality of life features and better error messages. However, Python does provide more tools to do more complicated things (async, type hints, etc), but that's not what most people use. They actually don't even know about it, and don't have to care. So it's not the questions you see o…

>It's also why you don't get multi-line lambdas. Everything is a compromise. Arguably too much of a compromise. This is just Guido doing a "because I say so" and imposing his bias against functional programming. Give me a properly-designed language like Ruby any day over Python's bag of compromises.

And yet Ruby never took off outside of RoR and is dying. Lisp and Haskell are still niche languages.

So somehow, languages promoting big chunks of anonymous code never win never win the public heart.

In fact, when you are force by an accidental monopoly to use ine, you get js. What do people do in JS ? Multline lambda are mapped to property names or replaced with await. Registries are used in every framework. We spent 2 decades fixing JS to use as little callback hell as possible.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#153

Earlier quoted context omitted.

> and there is seemingly no other way to discover what that is Yes there is, it's called reading a goddamn book. > Knowing the right thing to do requires you be informed about the history of Python language design Bullshit, it requires you knowing the language. Perhaps by reading a book. Knowing the history is of little value. > sifting through the massive corpous of documentation and historical knowledge required to…

This seems odd. I've known no one who learns programming by reading books. Reading books help, but most people get proficient by working on projects.

I did, years ago before I had a computer and when I got an opportunity I would type programs at school/terminals/store computers. I think being forced to visualize the code before can help because when you sit down it's just typing.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#154

Earlier quoted context omitted.

> and there is seemingly no other way to discover what that is Yes there is, it's called reading a goddamn book. > Knowing the right thing to do requires you be informed about the history of Python language design Bullshit, it requires you knowing the language. Perhaps by reading a book. Knowing the history is of little value. > sifting through the massive corpous of documentation and historical knowledge required to…

This seems odd. I've known no one who learns programming by reading books. Reading books help, but most people get proficient by working on projects.

> I've known no one who learns programming by reading books.

Similarly, taking a dance class won't make you a dancer, but it helps.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#155
post #78
post #22

Gah, those wordclouds are horrible attempts of analyzing "what the questions are about". There is no attempt at normalizing term frequency, or removing non-informational words. So words like "get" and "using" get a high score. It may also seem that the text analyzed is the entire post including metadata. For instance "closed" and "duplicate" both show, maybe just be because of "closed as duplicate"... Maybe even incl…

Some of the simple words and their prominence can be amusingly informative, though. Take data structures for example. "string", "array", and "object" are about as equally prominent in both JavaScript and Ruby (where the dictionary is called "hash"). In Python, however, "string" and "list" far outweigh "dictionary" and "object", which probably says something about what kind of data structures Python developers deal wi…

>”string” and “list” far outweigh “dictionary” and “object”

“Dictionary” probably loses a ton of hits by the split with “dict”. And “object” is basically a dead word in python now.

Plus, string and lists are typically hit by newcomers before they are taught dictionaries and classes. A lot of SO questions come from homework.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#156

Earlier quoted context omitted.

Yeah, I don't actually know if Python computes hashes for dicts by content or "identity". I just assumed it was the former, based on the fact that dicts are disallowed as keys.

It’s been a while, but I’m pretty sure the reason why a dictionary can’t have a dictionary as it’s key is because the dictionary class doesn’t implement the __hash__ method that would compute the hashcode.

This is definitely the proximate reason.

The reason for that choice is because the object is mutable.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#157
post #151
post #104

Earlier quoted context omitted.

There are plenty of compelling reasons to use other languages. Macros, types, threads, interfaces, lambdas, tail calls etc. But what matters in this world is short term profit. Python is easy to get started with, has a ton of frameworks than can be duct taped into semi-working software by mostly anyone and is taught in many schools.

While python does lack in many areas i think your list is a bit off. For macros, Python is one of the most meta-programmable language ever (for better or worse). Types, interfaces and lambdas exist. Threads also, caveat GIL, but also multiprocessing.

It's not the same thing.

In Python you don't have the full power of the language at your disposal, you can't add primitives like if/class/etc; in Lisp, the sky is the limit.

The lambdas are crippled; as are the threads, using processes is a completely different game.

I would consider spending some of that energy on learning Lisp.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#159
post #98
post #3

Seems like the most difficult programming is no longer cache invalidation and naming things. Its now about strings, and to duplicate arrays ... The stats are skewed because hordes of beginners. Mainly driven by what schools teaches and what languages has the most hype. That said Python is huge . Damn you significant white space.

I'm sure there's lots of beginners to programming but most of the time when I find myself asking basic questions like "how to duplicate array Python" isn't because I couldn't spend 2 minutes writing a function to do it but because there already exists a generally accepted best way to perform this operation that leverages the standard library and there is seemingly no other way to discover what that is. Like for this…

Python documentation is some of the best of any language, a lot of times you'll be able to find your answer quickly if you just look. The SO questions are almost all answerable with links directly to the docs.

This, above many other things, keeps me coming back to Python year after year.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#160
post #21

Earlier quoted context omitted.

Another thing I've noticed is that the Python community in StackOverflow is very nice and considerate most of the time compared to the JavaScript crowd. (Being a part of both). If anyone is interested in engaging by the way: https://sopython.com/

This seems true of the Python community in general. I've yet to meet anyone that's not nice and really supportive (there are bound to be some, but I've not knowingly interacted with them). I think it's a great measure of a programming language's ecosystem when taking part in the community is such a pleasure.

I don't recommend heading over to #python on Freenode then, if you want to maintain that belief! They're a bunch of purists, it's hard to squeeze a practical response from them a lot of the time.
Post reply on HN