Python Displaces C++ In TIOBE Index Top 3 (infoworld.com)
InfoWorld described the move as a "breakthrough":
As expected, Python has climbed into the Top 3 of the Tiobe index of language popularity, achieving that milestone for the first time ever in the September 2018 edition of the index. With a rating of 7.653 percent, Python placed third behind first-place Java, which had a rating of 17.436 percent, and second-place C, rated at 15.447. Python displaced C++, which finished third last month and took fourth place this month, with a rating of 7.394 percent...
Python also has been scoring high in two other language rankings:
- The PyPL Popularity of Programming Language index, where it ranked No. 1 this month, as it has done before, and has had the most growth in the past five years.
- The RedMonk Programming Language Rankings, where Python again placed third.
Tiobe notes that Python's arrival in the top 3 "really took a long time," since it first entered their chart at the beginning of the 1990s. But today, "It is already the first choice at universities (for all kinds of subjects for which programming is demanded) and is now also conquering the industrial world." In February Tiobe also added a new programming language to their index: SQL. (Since "SQL appears to be Turing complete.")
"Other interesting moves this month are: Rust jumps from #36 to #31, Groovy from #44 to #34 and Julia from #50 to #39."
Python also has been scoring high in two other language rankings:
- The PyPL Popularity of Programming Language index, where it ranked No. 1 this month, as it has done before, and has had the most growth in the past five years.
- The RedMonk Programming Language Rankings, where Python again placed third.
Tiobe notes that Python's arrival in the top 3 "really took a long time," since it first entered their chart at the beginning of the 1990s. But today, "It is already the first choice at universities (for all kinds of subjects for which programming is demanded) and is now also conquering the industrial world." In February Tiobe also added a new programming language to their index: SQL. (Since "SQL appears to be Turing complete.")
"Other interesting moves this month are: Rust jumps from #36 to #31, Groovy from #44 to #34 and Julia from #50 to #39."
... but if they hadn't handled the Python 2/3 fork so clumsily, this might have happened years ago.
If a variable is so badly named that the type is not clear
Never fear, I've brought my LPCWSTR.
Whatever the list, if Java is in the first place, there is no honor in being anywhere near the top.
In Soviet Washington the swamp drains you.
jvm written in c++
Static typing isn't just about clarity to the programmer. In strict typing languages, the rule is to use the type that matches the range that actually applies. This is to help testing (something coders should not ignore), automated validation, compilation (a compiler can choose sensible values, optimise the code, etc etc etc) and maintainers (a clear variable name won't tell anyone if a variable's range can be extended without impacting the compiled code).
Besides, I've looked at Python code. I'm not convinced their idea of a good variable name is in any way related to mine.
I have no problem with Python, it's ideal for many cases, but dismissing obviously poorly understood reasons is not a valid reason for using it. Either understand the reasons and give a valid counter, or accept that different languages suit different needs.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
Never mind Python 2 vs 3; one major reason I shy away from Python is the incompatibility in point releases. I'd see "requires Python 2.6â and see that I have Python 2.7 so it should be fine, right? Nope, code written for 2.6 won't run under Python 2.7. It needs to be EXACTLY 2.6.
It's at this point that some Python fanboi gets really upset and starts screaming about how that's now problem, with Python you set up separate virtual environments for each script, so that each one can have exactly the version of Python it is written for, with exactly the version of each library. When there is some bug or security issue you then hope that there is a patch for each, and deal with all that. (As opposed to every other peice of software in the world, which you simply upgrade to the latest version to get all the latest fixes). Yes, you CAN deal with that problem, it's possible, in most cases. You shouldn't have to. Every other language does some simple things to maintain backward compatibility in point releases (and mostly in major releases too).
Also the fact that most languages use every day and have used for decades use braces for blocks means my eyes and mind are very much trained for that. Braces aren't necessarily BETTER than just using indentation, but it's kinda like building a car which uses the pedals to steer and a hand stick for the gas. It's not necessarily inherently better or worse, but it would be almost undriveable for an experienced driver with decades of muscle memory in normal cars. Python's seemingly random choices on these things make it feel like using your feet to steer a car. There should be compelling reasons before you break long-established conventions and Python seems to prefer to break conventions just to be different. It seems the Python team is a bit like Berstein in that way. It's really annoying.
Tiobe notes that Python's arrival in the top 3 "really took a long time," since it first entered their chart at the beginning of the 1990s. But today, "It is already the first choice at universities (for all kinds of subjects for which programming is demanded)
Undergraduate was all C/C++ for me then I ended up at a graduate school where everything was Java. I disliked it so much that I decided to find an alternative and teach myself. I found Python and loved it. I still love it. You can't find anything better for both heavy duty programming and quick and dirty scripting. It's versatility makes It like the Linux of programming languages.
"Or any of the games in my library, which all appear to be C or C++, with a few C#."
From what I've seen a lot of the core engine stuff is C/C++; but a lot of the UI, AI, and "mod support" stuff is commonly done in Python and Lua.
Personally, I disagree with semantic whitespace so I don't like python. (I think its the editors job to handle pretty formatting to reflect the structure, rather than the programmers job to define structure with pretty formatting.) But I can see why python would be a good learning language / educational language.
Is there a programming language out there, that is as fast as C++ or even C, has a proper strict type system (no duck typing, nothing like Python or JS), fast garbage collection (no fuckin' auto_pointer worst-of-both-worlds), is elegant and emergent (so very powerful for its simplicity), and doesn't require an advanced degree in computer sciences to do simple things (Hello Haskell!). ... *keeps on dreaming* :--(
Of course with key libraries being available for it. (The equivalent of a standard library, Vulcan, a simple GUI widget toolkit, SDL, the POSIX API or equivalents, and easy usage of networks or sockets.)
IDE support would be nice, but isn't strictly necessary.
Also, it should not be made by mentally insane or criminally evil elements. (So no Mozilla, Apple, Google, Microsoft, Oracle, Amazon, Gnome, Canonical, or anyone using "web applications" or "the cloud" or a "app store" or is otherwise a data kraken or against privacy, and the likes. People who are not interested in "profit" or "growth", but in improving humanity, are of course preferred.)
That advocated a language. Languages shift faster than sand on speed. Universities should teach logic, reasoning, methodology, good practices and programming technique.
Languages should be for the purpose of example only. Universities should teach programming, not Java, software engineering, not Python. Java and Python should be in there, yes, along with Perl, C and Ada. Syntax is just sugar over the semantics. Learn the semantics well and the syntax is irrelevant. You want universities to teach kids how to program not only tomorrow but in 40 years. Trust me, Python 3 won't be used in 40 years.
This stupidity has happened before, when Cobol and Fortran were the in thing. Last forever, they thought. Nothing will replace them. Most programmers of that generation either spent a fortune relearning, because they'd learned syntax and not programming or retired, broke and penniless with a huge mortgage and no value.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
I find java in an uncanny valley. Its still a few times slower than c++ for the sort of stuff I do but it isn't enough quicker to develop than c++ to be worth that hit. Python is far slower than java even using numpy but its so easy to develop in that it is worth the gamble that it will be fast enough. And the rewrite in c++ will go quickly even if it isn't. The title is because VBA is 11x faster than numpy at small dense matricies and almost as easy to develop in.
refactor the law, its bloated, confusing and unmaintainable.
That's a pretty big jump. Groovy is a well-thought-out language and nicely facilitates writing clean, readable, compact code (especially compared to Java). However, it needs a better framework than Grails (85% really good convention over configuration stuff but 15% convoluted j2ee era framework stuff).
dna.js
You definitely never had to debug student's code.
Is that even a thing?
Python 2.7. It needs to be EXACTLY 2.6
Yeah, just FYI Python 2.7 is in a way its own thing. Different from the 2.x and different from the 3.x series. 2.6 is a no holds barred pure 2.x whereas 2.7 is a mixture of 2.x and 3.x features. So if you want to compare point releases, best to try that with the 3.x series. Also, if you're using something that requires the 2.x series, you shouldn't use that unless it is absolutely critical with zero replacements.
You shouldn't have to. Every other language does some simple things to maintain backward compatibility in point releases (and mostly in major releases too).
Again see argument about 3.x, but yeah not every language does this. Java 8/9 transition breaks things. ASP.Net to ASP.Net core breaks things along the way. I'm interested in what languages you have in mind, because I know quite a few languages that do maintain backwards compatibility (ish). For example, C++ pre and post namespace breaks fstreams in programs, but compilers provide flags to override that, so it depends on what you mean by breaking. Does it count if the compiler by default breaks, but providing flags fixes it? Because if your definition means including flags break compatibility, then oooh boy are there a a shit ton of broken languages.
Also the fact that most languages use every day and have used for decades use braces for blocks means my eyes and mind are very much trained for that
Yeah, it's clear that you've never used a positional programming language. I guess it'll be a sign of my age, but buddy, program COBOL or RPG on punch cards and let me know about that curly brace issue you're having. Positional and indentation has been used way, way, way, longer than curly braces. That's not me knocking on the curly braces, I love my C/C++ folks out there! But I hate to tell you C and C-style is pretty recent in the timeline of all things computer.
So... C, the language the python interpreter is written in [wikipedia.org] then?
Since the faster interpreter is written in Python anyway, I don't think it makes sense for the language to be associated with C.
Ezekiel 23:20
> Oracle is going to kill the goose
After releasing Java 9 last Sept then deprecating it in March then releasing 10 in March and deprecating it this month, it's a pain to keep up with Java. For corporate code that needs to last many years, Java has become a not good solution when that was previously it's most important attribute.
Not sure that's a good thing.
Table-ized A.I.
I really like the Qt framework. It's well done, well documented and well supported. Sure it's C++ so it doesn't meet your need of finding a new language but the API is pretty clean and simple so that you can avoid the complications and ugliness of C++ in most cases. If you need to though, it's all right there so you don't give up the additional power if you need it. The Python version is good too and very similar to the C++ version so it's not hard to switch between languages as your needs change.
And a majority of scientist write terrible code.
Python just lowered the barrier for mediocre coders.
> C++ pre and post namespace breaks fstreams in programs, but compilers provide flags to override that, so it depends on what you mean by breaking. Does it count if the compiler by default breaks, but providing flags fixes it?
If it results in weird runtime errors, that's definitely a problem.
If the compiler I'm using gives the message "incompatible use of fstream, try '-fstreamcompat' flag", that's no big deal.
Real code warriors don't need static types. If a variable is so badly named that the type is not clear, use type().
pfaaah. Real programmers don't need names. If the type of a variable is not obvious from context, get another job.
SJW n. One who posts facts.
It's fixable with a simple dependency addition in your maven pom, build.gradle or whatever you use. They handled the transition about as well as could be expected: allow re-enabling with an option, then remove completely later. If you're going to decouple all the extra stuff in the JRE, they did it reasonably well. I've made the change in a dozen projects or so, and it's all running on 9/10/11 without a hiccup.
So... C, the language the python interpreter is written in then?
I'm still on the lookout for all those C++ compilers written in python.
Or any of the games in my library, which all appear to be C or C++, with a few C#.
Python is great... for toy programs.
These sort of rankings are meaningless except for a very broad view of a language's overall popularity. Obviously, C++ absolutely dominates the videogame industry (btw, almost no one uses straight C either). Python dominates where it well should, in areas where you don't need the raw performance as you do when creating huge, performance-critical applications like videogames. For instance, at one employer, I used Python and Groovy in a game's build system, but obviously, the game itself was all written in C++ (and parts were in Objective-C for the Mac port). The game's content creation tools were written in C#, while it used a custom scripting language for some client-side content.
These sorts of lists are like making a ranking of the most popular carpenter's tools. Most popular: the hammer! Followed by: the screwdriver. Ooh, looks like the the nail gun has moved up, while the planer has dropped in our rankings! The circular saw remains steady, while the hand saw continues its plunge - no surprise there. etc... The point is that each tool, just like programming language has pros and cons, and tends to be most useful in pretty specific situations.
What would be far more useful is a general breakdown of popular languages within specific industries or for specific types of applications. But of course, it's far easier to pull together a simple "popularity" list.
Irony: Agile development has too much intertia to be abandoned now.
Can someone explain to me why using a dynamically typed language is a good idea for "big" applications ?
Python is subject to all sorts of really horrendous bugs that would not happen in a compiled, type-checked language.
For example if you are accessing an undefined variable in the else branch of an if statement, you won't know it's undefined unless that branch is taken. which means if it's something like a rarely occurring error condition it's kind of annoying. yes you can figure it out by writing enough test code, but really.
I love Python, but i think using for multi-thousand line application seems like a bad idea.
Is there something I'm missing here ?
enlighten me...
Absolute statements are never true
That must be an odd package. I have literally NEVER seen that with anything I have wanted to use, including my own pre-2.7.x software.
On a similar note, if something is marked deprecated long before it's removed, that matters. Five years of compiler/interpreter warnings saying "deprecated use of function in null context on line #47" gives plenty of opportunity. To fix it. From the bit of Python I've worked with, the recommended method on Friday completely stops working on Monday.
Type annotations and docstrings help with the whole lack of type declaration thing. Of course that requires discipline, which is in short supply from my experience. If you can force your developers to run pylint that will at least complain when they don't have docstrings.
I think what has really propelled Python into a higher rank is machine learning, where it is simply the de-facto language of choice by quite a margin.
I have to admit I am impressed with the progress it has made; of many recent CS grads I've talked to it seemed to be the favorite language...
I have to admit that over the years I've not really enjoyed Python much myself in the on and off again times I've used it, for me the spaces as indent levels maybe get too close to the meaningful whitespace of Fortran... I guess modern programmers do not have this hangup. :-)
So good work Python, a well deserved ascent!
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Egh. Worst Python code written by worst scientist is still streets ahead of the best LabVIEW program written by the best programmer-scientist.
Yes, Python lowered the barrier—for mediocre coders to write semi-intelligible code.
Eve Online is mostly written in Python, client and server.
It is the MMO game with the most concurrent users online at any time of the day.
Speed is not their problem.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
For example, C++ pre and post namespace breaks fstreams in programs, but compilers provide flags to override that
Dude, that was in 1990, back before there even was a standard C++. And I very much doubt those flags still exist today.
program COBOL or RPG on punch cards and let me know about that curly brace issue you're having
You seem to have forgotten how that really worked in your old age though. Punch cards had columns with specific functions assigned to them, so yes, of course you would have to skip certain columns on occasion. That was not indentation, though. You didn't have indentation; moving your holes by one position or one column meant the machine would interpret your instruction as something else entirely.
I have been sporadically using Python for some years already and never really liked it. Note that most of my experience is focused on C-based and strongly-typed programming languages. Recently, I have been spending some time on a Python project and have realised about its (newbie) friendliness.
I still don't quite understand the reason for all the tabs/spaces problems, consider it too slow, don't like the systematic need of relying on external resources and I will certainly continue using other languages before it. But I do understand now why newbies or those performing relatively small developments or those wanting to rely on some of the associated resources (although I don't like being systematically forced to include external dependencies, I do recognise that Python deals with these aspects quite gracefully and that there are many interesting libraries) might prefer Python. It is one of the most intuitive programming languages which I have ever used, at least from what seems a newcomer perspective (e.g., same command performing what are intuitively seen as similar actions).
Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
"Not when they care about performance they don't."
Of course not. But performance is (mostly) an engineering issue. Science tends to be more about getting answers at reasonable overall cost. Thus Python, MathLab and R.
You can't see ANYTHING from a car, You've got to get out of the goddamned contraption and walk...Edward Abbey
C++'s massive overhead? One of the guiding principles of C++ are zero-cost abstraction. Also, it's one of the fastest languages out there. If you couldn't meet your performance requirements with C++, you were doing something really wrong.
"I'm a bit skeptical that Python has the necessary package/module system to support a clean architecture for large (hundreds of thousands of lines) enterprise grade software."
I think you're likely at least somewhat correct. Python scripts longer than a few hundred lines tend to be increasingly hard to navigate. There is a module system. But it's kind of clunky and confusing. I, at least, have never warmed to it. There has to be some solution used in really large Python systems, but I don't know what it is.
"It doesn't seem terrible but it's not a revelation either - a lot like Perl but with a cleaner object system."
Python creator Guido Von Rossum has been known to say that Python and Perl are pretty much the same language. My experience is that that's pretty much true when coding. In my (limited) experience the difference is that if I come back to the code more than a few hours after I write it, there's a fair chance I will be able to read the Python. Perl? It'll look like a random dump of characters and operators.
=========
To my mind, the two strengths of Python are:
It'll do whatever you want to do -- procedural logic, objects, functional programming -- in a reasonably sane and comprehensible manner.
Some of the built in types -- string, list, file -- have nice sets of methods that do what one wants to do pretty sensibly. One exception to that -- list methods act on the list and return an error flag rather than returning the modified list. a = [2,1,3]; b = a.sort(). You expect b to be [1,2,3]? Nope a is [1,2,3], b is None (operation successful). If you wanted b linked to the sorted list? you should have used the sorted function. b=sorted(a) I've never encountered a programming language that didn't have idiosyncracies. I think Python has fewer than most.
You can't see ANYTHING from a car, You've got to get out of the goddamned contraption and walk...Edward Abbey
I don't think this should be about lines of code written. A more interesting approach would be to also count all dependencies, counting things like libc a gazillion times. Even more interesting would be to count what's actually executed.
0x or or snor perron?!
'bad habits' ? what sort do you think?
I sort of see it as the opposite... semantic whitespace teaches mostly good habits, its just fucking irritating to maintain, and to work with snippets and code fragments etc.
But its highly readable, and pretty straightforward, and i don't see anything wrong with it as a beginning/educational language; for teaching flow control, algorithms, structured/modular programming, and so on.
Not typesafe, and no switch/case ... what ever rocks your boat.
There is a module system. But it's kind of clunky and confusing. I, at least, have never warmed to it. There has to be some solution used in really large Python systems, but I don't know what it is.
What's wrong with the Python module system? It's pretty similar to the Java package system in principle (mapping 1:1 to directories and files), and that, while not perfect, didn't prevent a lot of large enterprise systems being written and maintained.
One exception to that -- list methods act on the list and return an error flag rather than returning the modified list. a = [2,1,3]; b = a.sort(). You expect b to be [1,2,3]? Nope a is [1,2,3], b is None (operation successful). If you wanted b linked to the sorted list? you should have used the sorted function. b=sorted(a)
Because lists are mutable, you need both sort() and sorted() to distinguish between "I want to sort this list, and have everyone else who has a reference to it see that", and "I want a new list with data from this list, but sorted". Pretty much all imperative languages have sort() behaving in the same way (e.g. see std::list::sort in C++) - that Python offers sorted() as well is actually more off the beaten track if anything. IMO, the names are chosen well to highlight the distinction - list.sort() reads as "sort this list" (implying in-place modification), while sorted() implies a new view on the data. The reason why sorted() is a function rather than a method on lists is because it can sort any sequence that way, not just list; OTOH, in-place sorting has to be collection-specific.
Also, list.sort() does not return an error flag. The usual reason why it might fail is if the comparison, or your key extraction function if one was specified, fails by raising an exception - and then that exception will simply be propagated. The only other reason is if your key extractor tries to mutate the list while it's being sorted, in which case you usually get a ValueError if it can be detected. Exceptions aside, the method always returns None, because all methods in Python return something; None is just the conventional unit value.
Returning error flags in general are very much frowned upon in Python, and exceptions are the standard way to communicate failures, much more so than in other languages (because CPython implements them as error code returns under the hood, they're very cheap).
That's great that they deprecate something on some occasions.
MY experience with the Python I run is that one version gives no warning, going up one point release throws multiple fatal errors.
> This is readily obvious when you look at the changelogs
Maybe that's the thing - one has read the changelogs to see what is deprecated, as opposed to getting a clear deprecation warning from the interpreter/compiler like you would with C, Perl, and other languages?
It's possible that a Python expert might be able to tell me something like:
If you want to be warned about deprecations, while setting up thr virtual environment for that script you have to set the shell environment variable PYTHON_DONT_BE_SHITTY
or whatever.
Following the basic HOW-TO on Python.org, they run clean under 2.x and die with fatal errors on 2.y. If I studied the changelogs enough I might be able to maintain these scripts, but that leaves a terrible first impression so I don't WANT to deal with this *;"+_!" language. I learn new languages and figure out things like that if the language seems like it's going to make my life easier and be worth it. Python appears to be a major pain in the ass for no good reason in several ways, so I'm not seeing that it's something I want to learn. Not more than enough basics that I can do some simple maintainence when I have to.
> And I have never, ever seen a deprecation warning in C or C++. You have to read the change sections for new standards to see what was deprecated or removed.
The default with gcc is to warn about deprecation. .bashrc oe wherever. What's most often recommended is -Wall to show all warnings of all types.
You can turn the warnings off by setting the CFLAGS environment variable to include -Wno-deprecated, which you can do in your