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…
It's also nicely self-contained, especially if you use a distribution like Anaconda. You don't have to spend hours fighting with the configuration and tooling. It's also very easy to debug and step through code using Spyder, which is similar to MATLAB. It makes it easy for someone who is smart and generally competent with computers to be productive in a short amount of time without first amassing huge amounts of arca…
Python has brought computer programming to a vast new audience
101–110 of 268 posts
Re: Python has brought computer programming to a vast new audience
#102Earlier quoted context omitted.
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?
This may sound super n00b but I really like that Java is explicit about everything. So for instance, you explicitly specify variables, methods as private with the keyword 'private'. In python you have to use an underscore, and its still not really private, its obfuscated. That's just one example, but in general I really like that kind of by-the-book verbosity, instead of having to mentally map it into the OOP concept…
Re: Python has brought computer programming to a vast new audience
#103Read 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…
It's definitely not.
Re: Python has brought computer programming to a vast new audience
#104Am I the only who thinks that "90% of American parents want their kids to be computer scientists" is rather unsettling? The market is currently full of people who are in for the money and will continue to be. It will be filled with people until supply meets demand. That the salaries will drop significantly is a natural result of this. We had this pork cycle for teachers, doctors and other highly trained people. No on…
I agree it is unsettling, and I'm one of those ones who studied computer science for no other reason than the American "follow your dreams" meme. There weren't a lot of kids in my CS department at school, and they definitely weren't the business school follow the money types. We have had quite a few applicants lately who can't program their way out of a wet paper bag, but we have also had quite a few very qualified ones who were rejected simply because there weren't enough open positions.
It's generally a challenging job despite the myths, and programmers seem to be good at making things worse and more complicated for themselves, thus requiring more resources (programmers) to fix things. Also, the field is becoming deep enough that there are all types of specialties. Right now, AI and cryptography specialists can probably command high salaries, while your jack-of-all-trades guys are becoming a dime a dozen
Re: Python has brought computer programming to a vast new audience
#105Earlier quoted context omitted.
Why would you want to actually enforce privacy? That makes it harder for the user to patch. Better to provide a mild discouragement via "_name".
Because in traditional object-oriented design you would extend rather than patch. It's the open-closed principle. There are many benefits to enforcing privacy, and one of the biggest ones is that you can make changes to the internals of your library without breaking your users' code, because they never had access to the internals.
Don't stop me from patching your buggy code. If writing an extension is more efficient, that's how I'd solve the problem.
Re: Python has brought computer programming to a vast new audience
#106For some reason, I never liked Python. I don't know... its classes look weird with all those self, __init__, etc. The __init__.py for packages is also a strange choice to me. It has classes, but no interfaces. The language is even slower than PHP. Does Python have type hinting? What all the hype is about? I just don't get it.
Yes, Python has type hinting since 3.5[1]. https://www.python.org/dev/peps/pep-0484/
Re: Python has brought computer programming to a vast new audience
#107Earlier quoted context omitted.
bools can be silently converted to int. 1 + true is ok, but 1 + "true" throws. Sometimes you do want to do math on bools, but it would avoid a class of errors if they would make you wrap them in 'int(the_boolean_variable)'.
issubclass(bool, int) == True in Python 2. They're not converted to ints silently they are ints.
Re: Python has brought computer programming to a vast new audience
#108Earlier quoted context omitted.
> 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 think it does that. I don't agree with that takeaway. You ask us to consider all the diversity of opinions here, but then you evaluate them out of context, what one person says about Python is not necessarily in reference to the metrics tha…
> Why do you think Python, or any programming language, has to be "revolutionary" -- or engage in cultmindthink -- for it to become popular? I don't think it has to, and I didn't say you HAVE to. I'm saying that you can accomplish the goal with a community that prides itself on ignoring things. Python's community is even more insular and ensconced in their opinion than editor proponents. Most Vi proponents can tell y…
And how they managed to develop a unit-test framework for the standard library which coincidentally happened to be similar to the xUnit architecture?
It's a miracle that a group so dedicated to ignoring things even heard about the 'await' and 'asynch' keywords for asynchonous programming - https://www.python.org/dev/peps/pep-0492/#why-async-and-awai... - much less implement them.
Re: Python has brought computer programming to a vast new audience
#109For some reason, I never liked Python. I don't know... its classes look weird with all those self, __init__, etc. The __init__.py for packages is also a strange choice to me. It has classes, but no interfaces. The language is even slower than PHP. Does Python have type hinting? What all the hype is about? I just don't get it.
No interfaces? from collections.abc import Sequence Slower? import numpy as np
> Slower?
Yes, overall the language is slower than PHP. It's not a bad thing, just the result of benchmarks. It doesn't mean one should stop writing Python.
Re: Python has brought computer programming to a vast new audience
#110Am I the only who thinks that "90% of American parents want their kids to be computer scientists" is rather unsettling? The market is currently full of people who are in for the money and will continue to be. It will be filled with people until supply meets demand. That the salaries will drop significantly is a natural result of this. We had this pork cycle for teachers, doctors and other highly trained people. No on…