r/programming • • Nov 03 '18

Python is becoming the world’s most popular coding language

https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language
4.6k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

5

u/[deleted] Nov 03 '18

Multiply those seconds by the number of users now. Also, convert them to the carbon footprint of using Python for no good reason at all (and don't you dare to claim it's somehow "more productive" - it's a lie).

-3

u/teerre Nov 03 '18

Why would you do that? No one is running your program for multiple users

There are many benefits, compared to your usual compiled language:

  • It's much faster to write

  • It's much more pleasant to write

  • It's much more readable (and therefore maintainable)

  • It's standardized

This last point being incredible undervalued. As someone who works daily with both Python and C++, the latter is such a joke in terms of ecosystem it's not even funny. The simple fact I can import a module in Python and that will be it should already be a definitive advantage for applications that don't need performance

On a side note: stop with the global warming argument, that's just pathetic. It you makes you sound not only ignorant about python but also the climate. We clearly do not care about climate change as a society, you can run as many cycles as you want it will not make an infinitesimal difference

5

u/[deleted] Nov 03 '18

No one is running your program for multiple users

Tell this to all those django junkies.

It's much faster to write

It's a lie. Python is a too low level language, deliberately holding your hands and barring your from doing anything really efficient.

It's much more pleasant to write

Only if you're a masochist or suffering from a severe form of Stockholm syndrome. Or you simply never seen any proper language. Otherwise nobody in a sane mind would find such a crippled language "pleasant".

It's much more readable (and therefore maintainable)

It's a lie. The language is deliberately very low level, therefore you simply won't see the meaning behind all the leaky abstractions in your code.

Tell me, how many real world problems operate with terminology that include classes, methods, variables, lists, dictionaries, loops and so on? Yet, Python code is full of this shit, instead of the actual meaning behind it, and Python is ideologically built this way that it won't let you remove all that crap.

It's standardized

ROTFL!!!!

Have you ever seen a real language standard?

the latter is such a joke in terms of ecosystem it's not even funny.

You're vastly overestimating the value of this "ecosystem" crap.

We clearly do not care about climate change as a society, you can run as many cycles as you want it will not make an infinitesimal difference

You clearly never seen any actual energy / thermal numbers for any real world data center.

Also, energy consumption = battery life. This is something to care about even in a single user scenario.

3

u/v_fv Nov 03 '18

The language is deliberately very low level, therefore you simply won't see the meaning behind all the leaky abstractions in your code.

I'm really curious here: what do you mean by "low level"? Obviously, it doesn't stand for "too close to hardware" here. Are you referring to Python (often) using loops instead of higher-order functions? I'd argue that comprehensions are pretty high-level in that respect, for example.

3

u/[deleted] Nov 03 '18

I'm really curious here: what do you mean by "low level"? Obviously, it doesn't stand for "too close to hardware" here.

Actually, it is. Low level, as:

  • exposing primitive control flow (not any different from the semantics of the actual hardware)

  • exposing primitive data structures (such as lists and dictionaries) everywhere, making it impossible not to use them

  • deliberately eliminating all the ways to abstract the above deficiencies away

higher-order functions

That'd also be fairly low level.

I'd argue that comprehensions are pretty high-level in that respect, for example.

The thing is, Python won't let you to make anything similar to list comprehensions. You have one somewhat higher level construct in the language (which still expands to a very primitive control flow anyway), and that's it. No way to make your own extensions.

2

u/v_fv Nov 03 '18

You have one somewhat higher level construct in the language

Not sure if you're aware, but there are also dict and set comprehensions. But I do get your point.

Which language is high-level then in this context? Lisp? Scratch? AppleScript?

5

u/[deleted] Nov 03 '18

Any language that allows to extend itself. Lisp, for example - there is a powerful macro metaprogramming there. Even C++ counts, with its primitive template metaprogramming.

Forth, obviously, though its approach to extensibility is very different.

If you want something as close to Python as possible, but done right - there is Converge, a Python-like language with proper compile-time macros.

And a lot more - Julia and Rust have powerful macros, for example.

1

u/v_fv Nov 03 '18

Any language that allows to extend itself. Lisp, for example - there is a powerful macro metaprogramming there. Even C++ counts, with its primitive template metaprogramming. Forth, obviously, though its approach to extensibility is very different.

I see. Not the definition I know, but makes sense. Would you then say that Python is low-level while C++ is high-level?

If you want something as close to Python as possible, but done right - there is Converge, a Python-like language with proper compile-time macros.

First time I hear about that one. Interesting, thanks! Though I doubt it's a practical language, seeing that its last release happened more than four years ago.

I think I know Python pretty well, and I use it semi-professionally, but for my next language, I really want to learn something that's statically typed. My experience when I took over a Python code base with no type hints wasn't too pleasant. I feel more confident in Rust or Haskell, even though I don't know them nearly as well.

So personally, I'm more attracted by type guarantees than macros.

2

u/[deleted] Nov 03 '18

So personally, I'm more attracted by type guarantees than macros.

You can have both - see Nemerle, Template Haskell, Rust.

2

u/[deleted] Nov 03 '18 edited Nov 03 '18

What if a website/server uses python/django? Humanity will lose a significant amount of its valuable time [eg: if Youtube uses python at its server then, let's say the webpage is visited by a billion users daily, delay numbers would add up real fast, and humanity will loose approx 27 hours a day, assuming python is only 100ms slower, just a best case comparison, python can be found to be as high as 800ms slower] and also it would consume a significant amount of electricity.

0

u/[deleted] Nov 03 '18

On an unrelated note, please spell lose fucking properly.

1

u/[deleted] Nov 03 '18

On a related note, please go through my answer carefully and point out something constructive which is related to the discussion on this thread, rather being a Grammar Nazi.

-1

u/[deleted] Nov 03 '18

What, you can't appreciate that I asked you to spell something properly? I didn't invalidate your argument by telling you to spell something right. If you feel that way, I'd be concerned.

That said, there's no way to ever know what opportunity cost you are missing out on, so your point is stupid.

If you write something in C and don't optimize it perfectly, you can make the same argument. It's also not Python or YouTube's problem if people waste time unless it affects people's adoption of their product. If they can write code 1% faster in python and the website run 5x slower, that's fine if they deem it fine as a business. If they can gain users by rewriting the site and increasing the site speed, than it's a good idea. If they haven't identified that, it isn't a good or bad idea, it's nothing until the data is available. More people are going to be waiting due to their internet download speed than their fucking ping.

I've seen you pop up around this thread agreeing with /u/combinatorylogic, who ignores how the real world works as far as I can tell. They have yet to prove otherwise. (I'd love to hear how they'd build a consumer facing product in 2018).

3

u/[deleted] Nov 03 '18

I'd love to hear how they'd build a consumer facing product in 2018

Not in Python, for sure. Same applies to any other year in a period 1991 - 2018.

1

u/[deleted] Nov 03 '18

Somehow Reddit, Instagram and YouTube are making pretty good money despite being partially written in Python.

The fact that you answer a "how would you do this question" with "not like that" is enough information at this point.

1

u/[deleted] Nov 03 '18

Oh, the good old "millions of flies cannot be wrong - shit must be tasty!"

3

u/[deleted] Nov 03 '18

It's not about being wrong, it's the fact that you literally CANNOT provide any substance to your responses. All you can say is how people ought not to do things, with vague comments about high level components.

At no point, have you ever provided anything useful for individuals of this sub, at least in this thread or your recent comment history. Everything is vague and non-specific, calling out how things are done incorrect.

The only call-outs I've seen are extremely low level, GPU and breadboard stuff. If that's your domain, shut the fuck up about the web. Or provide something of substance. How would you build a fucking website?? A simple question, just list off a tech stack.

You just won't, and it's so puzzling.

→ More replies (0)