Ask Slashdot: Will Python Become The Dominant Programming Language?
An anonymous reader shares their thoughts on language popuarity:
In the PYPL index, which is based on Google searches and is supposed to be forward looking, the trend is unmistakable. Python is rising fast and Java and others are declining. Combine this with the fact that Python is now the most widely taught language in the universities. In fields such as data science and machine learning, Python is already dominating. "Python where you can, C++ where you must" enterprises are following suit too, especially in data science but for everything else from web development to general purpose computing...
People who complain that you can't build large scale systems without a compiler likely over-rely on the latter and are slaves to IDEs. If you write good unit tests and enforce Test Driven Development, the compiler becomes un-necessary and gets in the way. You are forced to provide too much information to it (also known as boilerplate) and can't quickly refactor code, which is necessary for quick iterations.
The original submission ends with a question: "Is Python going to dominate in the future?" Slashdot readers should have some interesting opinions on this. So leave your own thoughts in the comments. Will Python become the dominant programming language?
People who complain that you can't build large scale systems without a compiler likely over-rely on the latter and are slaves to IDEs. If you write good unit tests and enforce Test Driven Development, the compiler becomes un-necessary and gets in the way. You are forced to provide too much information to it (also known as boilerplate) and can't quickly refactor code, which is necessary for quick iterations.
The original submission ends with a question: "Is Python going to dominate in the future?" Slashdot readers should have some interesting opinions on this. So leave your own thoughts in the comments. Will Python become the dominant programming language?
Java is mainly large enterprise back end systems, and some android, and quite a lot of embedded stuff (nominally what it was invented for), and, worryingly, quite a lot of client side GUI stuff.
C++ is used for legacy systems and where you need speed.
C is used where you need speed, have simple programs and memory constraints, and old fashioned unix software.
C# is for windows programming and .net
Javascript is for browser programming and Node, and some general scripting, where someone has used it as their system's internal scripting language (see also lua)
PHP is used for relatively simple web stuff, because it's easy and works and has wide library support
Python is used for what PHP is by better developers, and has brilliant maths libraries so is increasingly used for anything maths related where esoteric things like matlab and R and F# are unhelpfully niche.
Haskell is used for academic curiosity, and some maths stuff.
Perl is dying out, but is still used for unix automation a fair bit.
-----
It doesn't have a threading problem. It solves the threading vs process problem. CPU bound threats *should* be processes. And it is safer and more efficient to have 1 GIL per CPU. IO bound threads should be threads. This why threads developed on 1-CPU machines and multi-process model developed on multi-CPU machines. Python has 2 libraries with effectively unifying model for inter-thread communications, but one uses processes while the other threads. Both have almost the same API. Processes are bad if you need a context switch before data can travel from one task's to another task's space. In modern processes, you lose more by having data travel from 1 L1 cache to another L1 cache. So you might as well have 1 CPU-bound thread per core when your threads are CPU-bound and do very little talking to each other. Which exactly what you get with multiprocess threading library.
Any guest worker system is indistinguishable from indentured servitude.
Back in the day, BBC Basic had both PROC & FN commands
Well it did, and I *did* use them, but single-line branchless definitions is quite far from named definitions being an orthogonal concept in a language.
Ezekiel 23:20
There is nothing wrong with GOTO, just as there is nothing wrong with longjmp or branch or break to label, it all depends on how and when you use it.
Ruby lover here. I can code Ruby while I sleep, but I felt a bit left out because there are so many awesome Python projects. .... that's about it.
In comparison, there's Rails as awesome Ruby project with a lot of momentum, and
With Ruby knowledge, it's actually pretty easy to grasp Python. There are a few gotchas and the syntax feels a bit boring compared to Ruby, but it's also easier to read other people's code because it's usually more explicit and a bit less dynamic than Ruby.
I still love Ruby, but it's good to be able to write a few lines of Python and release the power of Numpy/Pandas/Sympy/Matplotlib/NetworkX/... It took me about 2 weeks to learn enough Python to use those libraries, and I still learn new stuff every day.
Some parts of Python's syntax are really nice, e.g. list comprehension :
>>> [x**2 for x in range(10) if x % 2 == 1]
[1, 9, 25, 49, 81]
It's completely different than all the Enumerable methods in Ruby, but it's very powerful and quite easy to read after a while.
I will now end the discussion with the word Hitler.
But he would have totally been on-board with the whole whitespace to delimit things thing ...
It must have been something you assimilated. . . .
You missed FORTRAN. That's often faster than C. If your C is faster than your C++, you can fix it.
SJW n. One who posts facts.
Which means that you have no idea that you passed a dingus instead of a wackadoodle until some codepath that exercises the difference... and then you only find out at run-time, when your production system crashes. Sure, you can argue that this just means your automated tests were deficient, but that's always going to be the case, even when you apply great effort to get to 100% coverage. And you can argue that static typing isn't a perfect solution either, and I would never claim otherwise.
Hey, I never claimed it was good. I just corrected your assertion. Python *is* strongly typed. You absolutely can not pass a dingus instead of a wackadoodle. It will crash with a type error every time. It just will crash, instead of causing a compilation error, making the language strongly dynamically typed, not weakly typed as you asserted.
It's a wart, but it shouldn't stop you from getting your parallel computing done. You fire up the multiprocessing module, create as many processes as you think you need, and start crunching. I write most of my longer-running programs this way so that I can take advantage of multiple cores. But that's the beauty of Python - it's easy to avoid premature optimization. Write the script the easiest way first, profile it, and then go after the low-hanging fruit. Worst case, you end up with working code written entirely in C that's been thoroughly prototyped in Python. :)
W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
> Python is great for rapid prototyping and small scripts, but for large, complex systems I want both TDD and strong typing. At present, Java is probably the best language for such systems, when you consider availability of experienced staff, tooling and native features.
That's my experience as well. I work in what is now called "data science" (though I've been doing the same stuff for decades, back when it might have been called 'computational physics' or 'statistics' or whatever).
I find that even for initial development past a a hundred or two lines, I now prefer Java. Why? A simple, but universal and ubiquitous answer: just looking up the damn order and meaning of the arguments of a method.
For instance, in python data manipulation, which uses almost universally the Pandas library, built on numpy library, you could need to pass a DataFrame, a Series, or the underlying numpy array, or even lower level a built-in Python list as arguments (and they can be converted back and forth). I now have to look at my code at the called method to see which it was supposed to take and in what position.
With a typical Java IDE, I'd get feedback on the spot (red line) if I used the wrong one and a space would likely bring up the appropriate conversion method or a type-matching object reference.
Python does have many great libraries (though java isn't too bad at all) but I do not at all find it easier or faster to develop once a project is worth setting up a Java devel pipeline. Don't forget the cost to write all those tests which are much more necessary in Python than Java (and yes I have many more run-time errors with Python than Java).
Kotlin is a face-lifted & flab-tucked Java, compatible with all JVM libraries, and Scala is an interesting and sophisticated language with the same.
Personally, Fortran, and I mean modern Fortran 95+ is heavily underrated in usefulness. It still has by far the best array and matrix handling, many excellent intrinsic parallel constructions, an very good and ergonomic syntax (it went from the worst to the best with F90) for its purpose, and of course speed speed speed.
If it had been invented by some well funded Silicon Valley startup with a hipster web designer and partnered with nVidia as their native development platform for CUDA GPUs, it would be the considered the new hotness.
And it solved the Python indentation vs C/Java brace wars correctly: newlines are significant, tabs and space indentation is not.
if (cond) then
statement
else if (cond2) then
statement
else
statement
endif
And there has been academic empirical research on syntax style and errors----that one won. (I think it is also what Ada did).