Live data from Hacker News

Python has brought computer programming to a vast new audience

economist.com

21–30 of 268 posts

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

#21
Not only is Python easy to learn for beginners, it allows for some deeply expressive constructs and patterns that are difficult or impossible in other languages. This is why even though I started with C/C++ and Java pays the bills, Python is where my heart is. Thanks Guido.

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

#22
There seems to be a sentiment that Python is a kids language - but I think of Python as a language that scales with your experience. You can do some really interesting and complex things and I’m really appreciative of my deep understanding of the language through a decade of heavy use, open source contribution, and project ownership.

Recently I released a package which allows you to dynamically create or change function signatures and went deep into `typing` and `inspect`, and found the experience rewarding.

https://pypi.org/project/python-forge/

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

#23
post #6

Earlier quoted context omitted.

Can you explain implicit type conversions problems in python?

It is not a problem, it was just non expected behavior for someone trained in strong typed languages. For example, you want to calculate the performance of your ML algorithm by counting the correct predictions / total. My expectation was that the result of a division of integers, would be a float, specially if the modulo is not 0.

I think this was actually addressed and back-ported to 2.2+, with PEP 238.

https://www.python.org/dev/peps/pep-0238/

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

#24
post #6

Earlier quoted context omitted.

Can you explain implicit type conversions problems in python?

It is not a problem, it was just non expected behavior for someone trained in strong typed languages. For example, you want to calculate the performance of your ML algorithm by counting the correct predictions / total. My expectation was that the result of a division of integers, would be a float, specially if the modulo is not 0.

That's not an implicit type conversion, that's just a different convention for what '/' should do on integers.

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

#25
post #15

Python is a great language to start programming in. My biggest frustration with traditional programming languages (well, C/Java mostly) was just how much upfront effort and understand is required to do useful stuff. Whereas with python it is pretty easy to whip up a script, read input and transform it into output in real time etc. That said, I think its also important for Python programmers to dabble at least a littl…

Other than interfaces and generics (which would make no sense to add in Python, since it's dynamically typed), can you name some OOP features Java has that Python doesn't have?

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

#26
post #15

Python is a great language to start programming in. My biggest frustration with traditional programming languages (well, C/Java mostly) was just how much upfront effort and understand is required to do useful stuff. Whereas with python it is pretty easy to whip up a script, read input and transform it into output in real time etc. That said, I think its also important for Python programmers to dabble at least a littl…

W/O going into the war of I'm better than you (Python vs JAVA)... Python is built to make it easy to write good programs... where as JAVA is built to make it hard to write bad programs.... same objective but different thinking/approach to achieve it... hence one(Python) would eventually have larger adoption....

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

#27
post #7

The great advantage of Python is the vast amount of libraries out there for pretty much anything you can think of. As a C# developer that's the one thing, and probably the only, that I envy from Python.

I really dislike converting Python to a different language. What type is this? Go 5 libraries down to find out ;)

That's a common misunderstanding. Python's type system is in the unit tests necessary to ensure the code is doing what it should. This is a boon because all of the behavioral rules are co-located for efficient reference. ;)

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

#28
post #7

The great advantage of Python is the vast amount of libraries out there for pretty much anything you can think of. As a C# developer that's the one thing, and probably the only, that I envy from Python.

Back when I was getting more serious about programming (2010-ish), I had to decide between Perl vs Python as those two were the most widely used in my domain (bioinformatics).

I remember one of the argument for Perl was exactly this: the vast number of libraries in CPAN. You would be able to do tasks much quicker because you would just need to install these libraries and go on with your tasks.

Still, I decided to go with Python because it made so many 'click' for me about programming in general + because of its REPL, among other things.

It turned out to be one of the best decisions I have ever made :).

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

#29

For me it's somewhat strange that it is universally presented as a beginner's language. Python would be hugely confusing to me if I didn't keep the underlying C model -- dynamically allocated objects with reference counts -- in mind at all time. Together with a lot of protocol that is largely arbitrary.

To me that would only be relevant if I'm doing super performance sensitive stuff, and if that's the case I wouldn't be using Python.

I've been programming in both C and Python for years and never once have I had to consider reference counting in Python.

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

#30
> But in the past 12 months Google users in America have searched for Python more often than for Kim Kardashian, a reality-TV star.

This seemed so unlikely that I thought the Economist had incorrectly used the Google Trends comparison tool, but they are right:

https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F05z...

The gap is even bigger when you consider a worldwide audience (i.e. one less focused on American gossip):

https://trends.google.com/trends/explore?q=%2Fm%2F05z1_,%2Fm...

Post reply on HN