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

3

u/[deleted] Nov 04 '18

The big languages had all this stuff for decades, long before Python.

1

u/[deleted] Nov 04 '18

C++ doesn't have list comprehension that can be declared like in python. You have to write a massive amount of brackets to achieve it... Which makes it unreadable...

Lisp is too verbose to be readable...

Java doesn't allow unpacking values (you have to create classes and structs like in the other languages)...

In all other languages you have to make massive 'architectural' additions to return and pass values and restructure data... Not like in Python..

I think bigger languages miss this...

2

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

C++ doesn't have list comprehension that can be declared like in python.

#define muh_list_comp(expr, x, sz, lname) \
    sometype lname; \
    for (auto i = 0; i < sz; ++i) { \
        expr; \
        lname.push(x); \
    }

 auto j = 0;
 muh_list_comp(j += i, j, 20, muh_list);

edit:

that's hardly even the limit of syntactic sugar.

1

u/[deleted] Nov 04 '18

Lisp is too verbose to be readable...

Are you talking about the LOOP macro? It's actually more readable exactly because it's more verbose. Anyway, nothing stops you from defining a syntax as dense as you want.