Live data from Hacker News

Why Python keeps growing, explained

github.blog

31–40 of 459 posts

Re: Why Python keeps growing, explained

#31
I have been a heavy Python user now about 15 years, but for me now I'm increasingly reaching for modern JavaScript and particularly TypeScript to do the things I would have traditionally done with Python.

ES modules, fat arrow expressions, and all the other nice new syntax and library features have made the language so more pleasant to use. In many ways the ergonomics of TypeScript in particular are far superior to Python now, and I find that really surprising.

I haven't yet found a replacement for Django (particularly the ORM/Admin/Forms combination) it is just so incredibly productive to use. So, I don't think I will be moving off it, but it's certainly not the growth language for me anymore.

Re: Why Python keeps growing, explained

#32
I'm a bit surprised to see this article on GitHub blog, it feels more like something from dev.to - looking at the surface, with little actual insights.

Most of the provided reasons behind Python's popularity are true also for other languages - portable, open source, productive, big community. This can be also said about PHP, Ruby, or Perl back in 2000s. Why isn't Perl as popular as Python?

I don't think it's all about readability or productivity, but about tools that were built over the last 30 years that have been used in academia and now with the boom in ML/AI/Data Science, they made Python an obvious choice to use for the new generation of tools and applications.

Imagine that the boom in ML/AI didn't happen - would Python be #1 language right now?

Re: Why Python keeps growing, explained

#33

Earlier quoted context omitted.

> - it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace? I am leaning more towards it looking like pseudocode > - it has an enormous set of libraries available to use I believe that to be the actual reason. I've long held that python is a kinda bad language, but with FANTASTIC libraries

> but with FANTASTIC libraries written in C _and FORTRAN_ ftfy - it's the only way a tragically slow language like Python can keep up. Edit: didn't forget FORTRAN

Don't forget about FORTRAN

Re: Why Python keeps growing, explained

#34
The article assigns significance to the language when the real work is done by the libraries. And many good libraries inspire even more good libraries. At that moment the language no longer matters. But it matters in the beginning when people have to create the initial environment and this is what should've been underscored. Python lets you do so many things in so many ways that minor mistakes do not matter and everyone has the freedom to experiment, achieve results, discover that they've done something stupid, but at that moment you already feel confident to do it again, but better.

Re: Why Python keeps growing, explained

#35
post #11

Python keeps growing in number of users because it’s easy to get started, has libraries to load basically any data, and to perform any task. It’s frequently the second best language but it’s the second best language for anything. By the time a python programmer has «graduated» to learning a second language, exponential growth has created a bunch of new python programmers, most of which don’t consider themselves progr…

There's also the argument that at a certain scale the time of a developer is simply more expensive than time on a server.

If I write something in C++ that does a task in 1 second and it takes me 2 days to write, and I write the same thing in Python that takes 2 seconds but I can write it in 1 day, the 1 day of extra dev time might just pay for throwing a more high performance server against it and calling it a day. And then I don't even take the fact that a lot of applications are mostly waiting for database queries into consideration, nor maintainability of the code and the fact that high performance servers get cheaper over time.

If you work at some big corp where this would mean thousands of high performance servers that's simply not worth it, but in small/medium sized companies it usually is.

Re: Why Python keeps growing, explained

#37

Comparing Python to Java 8 and saying it’s more readable isn’t showing much. And it’s not very portable the second dependencies with native code (which is common since pure Python is too inefficient for many tasks) are used. I think Python is popular for two reasons: - it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace? - it has an enormous set of librari…

I started in Python, as a Biologist (hooray for Jupyter-lab, coding so visually, in small steps, with output just there is so great when starting to learn Python). I ventured into other languages every now and then. For example I tried to make an Android app in Kotlin that gets info from some API. I expect something like this but with more brackets everywhere:

    import request
   
    data = request.get(https://some.api/get_some_json)
    some_value_I_want = data['dig']['into']['nested_structure']
    
I didn't get it to work at all, I was lines and lines of code into the program when I didn't even get to see any returned values.

Also, say I want to make a nice plot of some tabular data (.tsv), I do:

    import pandas as pd
    import seaborn as sns
     
    data = pd.read_csv('some_file.tsv', sep='\t')
    pd.melt(data, value_vars=['s', 'max_vms'], id_vars=['sample', 'process', 'N'])
    g = sns.FacetGrid(data=data, col='process', row='variable', hue='sample', sharey=False, margin_titles=True)
    g.map(sns.barplot, 'sample', 'value', order=data['sample'].unique())
    
Boom, what a plot (or large grid of plots actually), so much information. Can anyone show me how to do this in some other language (but R)? Idk, maybe I'm just not so smart, I just learned to program at 35 after always being a biologist, but any venture into any language has me thinking: Why does this have to be so complicated?

(Btw, I'm putting 4 spaces in front of the code, why is it not rendered as code?)

When I just started I used Python to read, sort and transform images and output them to a PowerPoint file. One can use CSS like synthax to format the slides. Boom PPT with 120 slides with images and data from some Excel file that convinced a lot of people with a lot of data that fluorescent images next to H&E stains + metadata can be nice. Is it the best way to present such data? Meh. But man was it cool and easy and time saving.

Re: Why Python keeps growing, explained

#38

Comparing Python to Java 8 and saying it’s more readable isn’t showing much. And it’s not very portable the second dependencies with native code (which is common since pure Python is too inefficient for many tasks) are used. I think Python is popular for two reasons: - it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace? - it has an enormous set of librari…

> - it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace? I am leaning more towards it looking like pseudocode > - it has an enormous set of libraries available to use I believe that to be the actual reason. I've long held that python is a kinda bad language, but with FANTASTIC libraries

And fantastic documentation!

Re: Why Python keeps growing, explained

#40

The article assigns significance to the language when the real work is done by the libraries. And many good libraries inspire even more good libraries. At that moment the language no longer matters. But it matters in the beginning when people have to create the initial environment and this is what should've been underscored. Python lets you do so many things in so many ways that minor mistakes do not matter and every…

5his is right in the spirit of: The Python community is a bunch of people learning programming together.

Someone else made this remark once, when the indroduction of type annotations was discussed as the python community discovering the benefits of static typing.

Post reply on HN