Live data from Hacker News

Python has brought computer programming to a vast new audience

economist.com

231–240 of 268 posts

Re: Python has brought computer programming to a vast new audience

#231
post #178

Someone else said this on HN: Python is the second best language in almost every field of computing. That's why there's a library for everything in Python. It's limitations are also not terrible for most people. If you want super fast, you will know how to do that some other way. If you just want simple and easy to read, you use Python.

> Someone else said this on HN: Python is the second best language in almost every field of computing. It isn't. Frankly, it isn't even top 3 in any "field of computing" depending on how you define "field of computing". What python has going for it is the evangelists who do a great job of spreading the word and of course funding - they have lots of money backing the language. Also, being an interpreted language, it h…

>> Also, python wants to be everything ( functional, OO, imperative, etc ) and hence is the worst language to learn programming language topics in my humble opinion.

I think it doesn't get the functional/imperative parts right as they seem to be patched onto it. It is just a scriptable, OO language and pretty good at it, when combined with it's batteries included et al.

OTOH, Common Lisp is everything and is great at it. IMHO, a language with only paradigm is very restrictive and rarely helps when solving real world problems as they can't be effectively modeled in one paradigm only.

That is why CL is just a joy to solve problems with. So is Python and anything else if that one major paradigm that it supports is a right fit for the problem at hand.

Re: Python has brought computer programming to a vast new audience

#232
post #178

Earlier quoted context omitted.

> Someone else said this on HN: Python is the second best language in almost every field of computing. It isn't. Frankly, it isn't even top 3 in any "field of computing" depending on how you define "field of computing". What python has going for it is the evangelists who do a great job of spreading the word and of course funding - they have lots of money backing the language. Also, being an interpreted language, it h…

>> Also, python wants to be everything ( functional, OO, imperative, etc ) and hence is the worst language to learn programming language topics in my humble opinion. I think it doesn't get the functional/imperative parts right as they seem to be patched onto it. It is just a scriptable, OO language and pretty good at it, when combined with it's batteries included et al. OTOH, Common Lisp is everything and is great at…

What sort of imperative flow do you find awkward in Python?

Re: Python has brought computer programming to a vast new audience

#233

Read the comments here. Look at the diversity of opinions and the number of them that, while professing love for Python, directly contradict each other. Python is verbose|concise, simple|advanced, disciplined|experimental, modern|classical. It goes to show: something doesn't need to be actually-better. It doesn't need to be actually-simpler. It doesn't need to make your job easier or better. It needs to make people t…

For best results, read in the voice of the Architect.

More seriously, Python borrowed list comprehensions and the like from other programming languages and Javascript said "Hey, that's a good idea.".

Re: Python has brought computer programming to a vast new audience

#234
post #59

Earlier quoted context omitted.

> My big regret with Python 3.0 is that the scoping rules in list expressions changed to prohibit modification of variables in surrounding scope. This degraded the utility of list expressions. The work around is so long-winded. Can you elaborate? I'm not sure what this is referring to.

In Python 2.x the loop variable is part of the containing scope: >>> a Traceback (most recent call last): File " ", line 1, in NameError: name 'a' is not defined >>> [a*2 for a in (1,2,3)] [2, 4, 6] >>> a 3 In Python 3.x, it is not: >>> a Traceback (most recent call last): File " ", line 1, in NameError: name 'a' is not defined >>> [a*2 for a in (1,2,3)] [2, 4, 6] >>> a Traceback (most recent call last): File " ", li…

In Python 3.8 you will be able to use assignment expressions:

    [a := x*2 for x in (1, 2, 3)]
See PEP 572 -- Assignment Expressions: https://www.python.org/dev/peps/pep-0572/

Re: Python has brought computer programming to a vast new audience

#235

The thing I love most about the language is its conciseness, on several levels. It's syntactically concise because of its use of whitespace and indentation instead of curly braces. Expressions are often concise because of things like list slicing and list expressions. It can be linguistically concise, because it is so easy to fiddle with the data model of your classes, to customize their behavior at a deeper level. F…

I went through a course in python about a decade ago and I enjoyed it! Then along the way, I picked it up here and there. Then used it at work for a few months to sort through a lot of data. Recently I started trying to learn swift through the Stanford course. And the curly brackets confused the heck out of me. They still do! They just seem to pop up out of nowhere. All to say , I completely agree with your second pa…

Curly brackets fulfill the exact same function as indenting a code block in Python - it defines scope and ties code together.

Re: Python has brought computer programming to a vast new audience

#236

Earlier quoted context omitted.

agreed with all the posts above, the only real letdown for me was always the difficulty to produce standalone executables. I would really love a python equivalent to uberjars or go's build tool.

I recently used PyInstaller to wrap Black (the code formatter) and it worked perfectly in two minutes. Literally one command to take the whole script and produce a standalone executable. There's also something like this: https://build-system.fman.io/

The thing about pyInstaller is that it works absolutely perfectly... until it doesn’t. In which case you are stuck spending days on trying to kick everything in your project into shape with the hope of it working.

That is what I hate most about Python, there is only one sure-fire way of doing packaging and that’s setting it up even before you write your first line of code and the testing constantly as your project evolves.

Myself and others have absolutely no trust in the several build pathways because they all fail horrible for a wide range of reasons. To the counter, if I have a C++ or C# project I’m very confident that it will almost always be a breeze to package it up.

Re: Python has brought computer programming to a vast new audience

#237
post #196
post #183

Earlier quoted context omitted.

"My hope is that python will serve as a "gateway drug" to other languages like ruby, ML, C/C++, SQL" Your inclusion of SQL in that list really shows you have no idea what you're talking about.

SQL is immensely successful.

Yea, so is HTML, but if someones list of useful programming languages went C#, HTML, ruby, SQL. You would have to admit too that you would consider that person very inexperianced. It’t like listing a blender in a list of your favorite power tools. It’s not that it’s not useful for what it does, it just doesn’t belong in that particular comparison.

Re: Python has brought computer programming to a vast new audience

#238

Earlier quoted context omitted.

"Besides the odd gripe here and there, the language really gives me a warm glow." That's a perfect summary of my feeling towards it, too. If the PSF puts up a GoFundMe for sending Guido on a nice vacation of his choosing, I will be happy to chip in a few bucks. Same goes for Linus when he hands over the reins, and a few other maintainers who probably cannot be adequately compensated for the impact of their work.

I agree. I came to Python in 2000, after Perl (1996-1998), PHP (1999), Matlab (1992-1996), C++ (1990), Fortran (1989), C (1988), Pascal (1988), Assembly (1984-86) and Basic (1981-83). After all those, I found Python, as the saying goes, really does "fit your brain" [1]. Since discovering Python 18 years ago, I have looked at Haskell, successfully avoided Java, and promised myself to "one day" do more JS. Still, Pytho…

Totally the other way around for me. Perl fits my brain. Python I can't comprehend.

Re: Python has brought computer programming to a vast new audience

#239
post #196

Earlier quoted context omitted.

SQL is immensely successful.

Yea, so is HTML, but if someones list of useful programming languages went C#, HTML, ruby, SQL. You would have to admit too that you would consider that person very inexperianced. It’t like listing a blender in a list of your favorite power tools. It’s not that it’s not useful for what it does, it just doesn’t belong in that particular comparison.

SQL stands for standardized query language.

Re: Python has brought computer programming to a vast new audience

#240

Read the comments here. Look at the diversity of opinions and the number of them that, while professing love for Python, directly contradict each other. Python is verbose|concise, simple|advanced, disciplined|experimental, modern|classical. It goes to show: something doesn't need to be actually-better. It doesn't need to be actually-simpler. It doesn't need to make your job easier or better. It needs to make people t…

Success and popularity of a programming language is mostly determined by the platforms it supports and the libraries it has available.

Objective C and now Swift is popular because you need to use one of them (without going to great lengths to avoid it) to write iOS apps. Javascript is popular because you need it to write web apps.

C and C++ are popular because they run almost everywhere, and are the implementation languages of many operating systems and software platforms.

You need Java to develop Android, and it has an incredible amount of libraries for server side web application development.

In a similar vein, TensorFlow and Numpy/Scipy makes Python the de facto language for machine learning, "data science" and scientific programming. It also has an amazing amount of libraries for web application development, text processing, and many other common programming tasks.

Libraries and community/popularity create a positive feedback loop. Large communities create more high quality libraries, which draw in more developers, which create more libraries, etc.

All of this is to say, I don't think much of your observations about Python's design and technical qualities and evolution have much bearing on Python's success one way or another, or for any other programming language. By design or accident, Guido managed to create a community that wrote a lot of useful libraries for many different kinds of tasks, that led to the positive feedback loop leading to Python's current popularity. "Forcing" is not an appropriate term for describing this phenomenon, I think, more accurate to say they have attracted a large community by making Python useful for many different tasks.

Post reply on HN