Python becomes the most popular language - Page 1
Forum section: electronics / general

author: Picuino
author_rank: Super Contributor
timestamp: October 06, 2021, 02:37:36 pm
content: What do you think about this?Source:https://www.tiobe.com/tiobe-index/"October Headline: Python programming language number 1!For the first time in more than 20 years we have a new leader of the pack: the Python programming language. The long-standing hegemony of Java and C is over. Python, which started as a simple scripting language, as an alternative to Perl, has become mature. Its ease of learning, its huge amount of libraries, and its widespread use in all kinds of domains, has made it the most popular programming language of today. Congratulations Guido van Rossum! Proficiat! -- Paul Jansen CEO TIOBE Software"

author: Picuino
author_rank: Super Contributor
timestamp: October 06, 2021, 02:46:08 pm
content: Python has long been the most popular language in PYPL.PYPL (PopularitY of Programming Language):https://pypl.github.io/PYPL.htmlCode:RankLanguageShareTrend1Python29.66 %-2.1 %2Java17.18 %+0.8 %3JavaScript8.81 %+0.4 %4C#7.3 %+1.1 %5C/C++6.48 %+0.7 %6PHP5.92 %+0.1 %7R4.09 %+0.2 %8Objective-C2.24 %-1.2 %9TypeScript1.91 %+0.1 %10Kotlin1.9 %+0.3 %Merits and demerits of language:https://www.eevblog.com/forum/programming/python-becomes-the-most-popular-language/msg4162963/#msg4162963

author: PKTKS
author_rank: Super Contributor
timestamp: October 06, 2021, 03:15:00 pm
content: read that gazillion times..I am sick of such "sums"Folks can obviously sum decently enough to conclude pretty much 90% of everthing in use comes from C (in such not even in need to sum C++..)Sum ANDROID (linux kernel) all AVR small gizmos - native C compiled ....They need to teach some fancy crap which is not total POSIX safe and can run on any crap console..BINGO! forget C/C++, PERL even lua GO and RUST ..no to mention uncle google is making a serious sponsor to promote RUST in place of C...I am waiting this round .. RUST !!! RUST!!!Forget C.. this is too OLD crap..Paul

author: Picuino
author_rank: Super Contributor
timestamp: October 06, 2021, 03:43:14 pm
content: I started using Python almost 20 years ago to test safety PLC code. I needed to render the code and ensure its suitability.I started by learning some Perl to get the job done, but soon some colleagues at work showed me the power and simplicity of Python and I never went back to Perl again.I love the expressiveness of the language and its ease of reading, among the many qualities that have already been mentioned.

author: PKTKS
author_rank: Super Contributor
timestamp: October 06, 2021, 04:01:51 pm
content: I deal with both .. being PERL mostly since 90s as it came very very earlier..IMHO - there is not a chance in hell to compare PERL with Python.PERL has probably an order of magnitude better and safer code (www.cpan.org)Integrated very close to UNIX being POSIX compliant ...And a hell order of magnitude better organized.Streams PIPES and sockets are just native as in any shell.On the other hand it takes a pretty long time to master..And all goodies are there.. bindings to all toolkits.. Gtk,Qt/Wx Curses..Python may be "easy" for shallow programmers.But the lack of closures...The odd dependency of spaces and a pretty much pathetic organized library set...result in a messy deploy usage base where a simple "version" mismatch throw a dependency exceptionNever happens that in PERL.You can upgrade the site and things keep running .. sometimes a minor glitch.Tried to upgrade python several times.. 90% times it failsRequiring FULL SITE ditch and re install..Messy pretty thing.Never wasted more time on that.. although a lot of people like this...usually they came from windoossss non POSIX messy rolling rocks...Paul

author: Picuino
author_rank: Super Contributor
timestamp: October 06, 2021, 04:36:26 pm
content: I agree, Perl has its advantages that I do not discuss.But what I want is to talk about Python.

author: xrunner
author_rank: Super Contributor
timestamp: October 06, 2021, 05:04:15 pm
content: Quote from: Picuino on October 06, 2021, 02:46:08 pmWait a sec ...QuoteI bolded the thing that concerns me about that data. But in any case the Python trend is -2.1% and the C variants are all positive.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 06, 2021, 05:38:09 pm
content: This is not surprising. Python has been on a steady rise for a number of years.Now of course, a more interesting analysis would be to estimate figures depending on classes of use cases.A general popularity index doesn't say all that much. A language becoming popular may just come from the fact its typical use cases themselves are becoming more popular.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 06, 2021, 05:44:03 pm
content: Quote from: xrunner on October 06, 2021, 05:04:15 pmYes. I kind of doubt the complete objectiveness of this PYPL thing anyway. What's the actual history of this project? Hasn't been Python first with their index right from the start? Is even the name starting with "Py" (while tons of projects/libraries based on Python start with "Py") just a coincidence? Yeah.

author: madires
author_rank: Super Contributor
timestamp: October 06, 2021, 05:56:16 pm
content: Maybe the most popular, but surely not the most efficient. And this is becoming a hot topic, or haven't you started talking about the CO2footprint of software?

author: Picuino
author_rank: Super Contributor
timestamp: October 06, 2021, 06:58:02 pm
content: In fact, the greatest effort in the development of the Python language is now being made to try to improve its efficiency.Its low efficiency is one of the reasons why it has not been implemented in the world of smartphones.

author: mansaxel
author_rank: Super Contributor
timestamp: October 06, 2021, 08:56:21 pm
content: I refuse, given the choice, to use a programming language that imposes "structure" by "number of invisible characters". That is stupid on a level only challenged by "one type of invisible character is to be interpreted different than another invisible character".Here are some hints on characters that without ambiguity can impose structure:{} () ;Apart from that fundamental stupidity, I'm sure Python is a nice language.

author: dferyance
author_rank: Regular Contributor
timestamp: October 06, 2021, 09:05:55 pm
content: Quote from: mansaxel on October 06, 2021, 08:56:21 pmI used to be dismissive of this kind of reasoning -- until I tried working in python.I've used programming languages before with whitespace being significant. These were F# and haskell and they worked just fine by me. The difference with python comes to programming style. In a functional language you define functions as frequently as you define variables; variables are just nullary functions. So having a simple syntax for them is critical. Functions are generally quite small so they don't have a ton of blocks to them. But in python you program in more of a procedural style. This means large functions with lots of nested conditionals. That makes a huge difference!That said, I just cannot get past the whole lack of static typing in python. There are some nice things there and I like the easy integration with C and C++. But without static typing it reminds me too much of javascript or perl. Oh, and it really needs a static linker; shouldn't need to run docker to deploy a program.

author: blacksheeplogic
author_rank: Frequent Contributor
timestamp: October 06, 2021, 09:35:37 pm
content: Quote from: mansaxel on October 06, 2021, 08:56:21 pmThis is the primary reason I have no interest in even trying to use python.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 06, 2021, 11:05:07 pm
content: Quote from: Picuino on October 06, 2021, 06:58:02 pmIt's interesting to see people trying at all costs to find new applications for an existing tool, while a more reasonable approach in engineering is finding the tools for a given application.IMHO, this is this non-very-engineeringly approach that got Python where it is now.We've been witnessing a similar trend with AI in general in the past decade.

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 06, 2021, 11:57:43 pm
content: Why would one care about 'popularity' at all?(Not a rhetorical question, I'm genuinely puzzled, and interested in any answers.)One obviously cares about the tools used in ones own field (and perhaps the fields that uses the tools one has), but 'popularity' (measured in this way) is exactly the wrong metric for that. It's like trying to measure short distances using the echoes generated by shouting.Even 'project count' is near to useless, because among the numerous projects, only a few are actually useful, and the majority is – perhaps unsurprisingly – quite crappy, especially wrt. security and software engineering principles (buggy, poorly documented).In my opinion, 'popularity' is an useless metric here. Perhaps it matters if you are desperate for any kind of programming job and don't know how to program at all yet –– but that's the only situation I can really think of where 'popularity' would matter.

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: October 07, 2021, 12:15:03 am
content: Doesn't anyone use Basic any more?

author: AntiProtonBoy
author_rank: Frequent Contributor
timestamp: October 07, 2021, 12:23:36 am
content: QuoteThe biggest advantage of Python is its low barrier of entry. Install the tool chain and you can hammer out code in minutes.

author: bill_c
author_rank: Regular Contributor
timestamp: October 07, 2021, 02:52:14 am
content: I don't care to be in the popular crowd. Counting spaces and trying to figure out if you should use 'SomeFunction' instead of 'someFunction' this week isn't for me.

author: brucehoult
author_rank: Super Contributor
timestamp: October 07, 2021, 04:16:00 am
content: Quote from: Picuino on October 06, 2021, 02:37:36 pmI think the word you were looking for in the subject line was "common".It's just awful.I like Ruby *much* more. It's much better designed. A fraction slower than Python, but if you were looking for speed you wouldn't be in this category in the first place.

author: golden_labels
author_rank: Super Contributor
timestamp: October 07, 2021, 05:21:32 am
content: How to lie with statistics, chapter 11½: make sure the variable is so vaguely defined it carriers no actual meaning, but the reader will instantly provide their own definition and never notice the value is meaningless.

author: Fred27
author_rank: Unknown
timestamp: October 07, 2021, 07:19:00 am
content: Popular is in no way the same as best. Ask the average guy to name a motorbike and they will probably say Harley, a microcontroller and they will say Arduino. Both very popular examples of the worst of their domain.Quote from: mansaxel on October 06, 2021, 08:56:21 pmTotally agree. I had to use Python recently as a scripting language within a product. (Python's good enough for scripting to be fair, it's just not a programming language.) You could use the internal textbox editor or edit in an external tool like Notepad++. One kept tabs, one converted tabs to spaces. Cue a subtle invisible run-time bug where the code looked like it would do one thing but would compile just fine and then do something else.The fact that JavaScript is high up in the list backs up my point. That was the worst programming language (once again only suitable for scripting) until Python came along.

author: jfiresto
author_rank: Frequent Contributor
timestamp: October 07, 2021, 08:04:45 am
content: Quote from: Fred27 on October 07, 2021, 07:19:00 amThat was addressed in Python 3 over a decade ago. For example, I tried replacing eight spaces with a tab inside a function that is not executed during import:Code:~% python3 foo.pyFile "foo.py", line 136os.remove(path)^TabError: inconsistent use of tabs and spaces in indentationIf you can mix tab and space indentation in Python 3 and it does not complain, report that: it is a bug.

author: tszaboo
author_rank: Super Contributor
timestamp: October 07, 2021, 08:38:14 am
content: Quote from: madires on October 06, 2021, 05:56:16 pmNah, I wouldn't say this. An average developer could write more efficient code in python easier than in C. There are a few companies that switched to python in high frequency trading, because writing code fast and being able to react to market conditions faster makes more profit than being able to calculate a millisecond faster. And being able to use the available resources is often times more useful.Try doing complex matrix calculations in C. Sure the same python implementation would be slower. But then you make it with Numpy, and it suddenly catches up, you can start using the video card by adding a few lines, and then it is suddenly faster, or add ray multiprocessing (few lines of code, really), and then the same code is running parallel on a distributed server farm. Try coding that in C.Or the new popular micropython microcontrollers. I had to evaluate a sensor IC, used the Pi Pico for it. 5 minutes later, I was logging it's data on uart. If I'm given the same task in C, 2 days later I'm still struggling setting up the GCC compiler into an IDE, or struggling with vendor specific libraries, with no progress on the actual task.

author: gmb42
author_rank: Frequent Contributor
timestamp: October 07, 2021, 09:25:13 am
content: Another potential discussion ruined by the usual suspects whining about why language x doesn't work forthembecause of y.Python is a white-space delimited, dynamically but strongly typed language, if you don't like it fuck off, and go and whine elsewhere.IMO the two points of this discussion are:What does "popularity" even mean for programming languages?What is it about Python that apparently makes it popular?