Why Qt desperately is targeting python ?
-
@croco I was using Qt and PyQt in 200x already, this is really nothing new and I have no idea why you think it could be desperation.
"Why they are eager for python?" - why not? If it is possible why shouldn't Python be supported? There are people using Python and Qt, there is nothing wrong about it. -
@jksh well if we are going with this logic, then we may see in the future a move for other programming languages like Java. If we proceed, then C++ programming will be at risk. But I still didn't convinced why pyhton rather than other programming languages such as Java, C# or even Matlab if the goal is to target academic audience. I'm not here to attack python rather I would like to see more convincing reasons for this adaptation.
-
Hi,
Java bindings were already done a long time ago. It was called Qt Jambi.
As for the Python move, there's no move, the bindings have existed for years. The main difference now is that you have a new set of bindings that follow the same licensing model as Qt itself which makes them easier to integrate in other projects.
Python is one of the main language in the research and academic fields. Take for example Pytorch and Tensorflow in the deep learning and artificial intelligence area.
There are other bindings that exists for other languages that are less known.
As for C/C++, it's not going away anytime soon. It's still the language that allows you to squeeze all the power you can from your hardware.
[edit: fixed typo SGaist]
-
Hi @croco,
I've just to add to @SGaist: Qt is written in C++ and that did not change even if QML existed for a decade. And you still can program in pure C++ without ever needing to know QML.
And that is what happens with lots of libraries: the core is written in a machine near language, but the API is exposed to anything possible. Just use the language that fit's your project best.
Regards
-
@croco said in Why Qt desperately is targeting python ?:
@jksh well if we are going with this logic, then we may see in the future a move for other programming languages like Java.
Yes, that's right. If Java becomes rapidly-growing, then it makes sense to consider targeting Java programmers too. In the practice of project management, this is called adaptation.
Nokia used to be one of the most successful phone makers in the world. However, it failed to adapt to new market conditions, so Nokia collapsed.
If Qt can adapt to the changing programming world, then Qt will continue to succeed.
If we proceed, then C++ programming will be at risk.
Can you explain why you think that supporting new languages puts C++ at risk?
The Qt Project is not dropping C++ in favour of Python; it is adding Python to its core C++ ecosystem.
But I still didn't convinced why pyhton rather than other programming languages such as Java, C# or even Matlab if the goal is to target academic audience. I'm not here to attack python rather I would like to see more convincing reasons for this adaptation.
Then let data convince you. See the Stack Overflow Developer Surveys:
- https://insights.stackoverflow.com/survey/2017/#technology
- https://insights.stackoverflow.com/survey/2018/#technology
- https://insights.stackoverflow.com/survey/2019/#technology
The table below summarizes what percentage of survey respondents used the languages that you mentioned:
Language 2017 2018 2019 Python 32.0% 38.8% 41.7% Java 39.7% 45.3% 41.1% C# 34.1% 34.4% 31.0% C++ 22.3% 25.4% 23.5% Matlab 4.3% 5.8% N/A As you can see, Python is the only one in the list to grow by almost 10% over the last 2 years. Back in 2017, Python was less commonly-used than Java or C#, but this year it has overtaken both Java and C#. Python is also expected to grow even more next year.
The Matlab community is too small, so it doesn't make sense for the Qt Project to spend too much effort targeting Matlab users.
-
@j-hilk said in Why Qt desperately is targeting python ?:
@jksh I'm curious, do you think the high Java part is mostly due to Android and it's multitude of platforms ?
Hmm... quite possibly.
According to https://insights.stackoverflow.com/survey/2019/#technology-_-platforms 27.0% of respondants developed software for Android (c.f. 53.3% for Linux and 50.7% for Windows)
So if we assume that 75% of Android developers use Java, that leaves 21.5% (= 41.7% - 0.75*27.0%) of respondents who do purely non-Android development using Java.
-
@croco said in Why Qt desperately is targeting python ?:
Since the primary goal for Qt is to provide C++ programmers with tools for building realistic GUI
What makes you say that Qt's "primary goal" is to support C++? Yes, it's written in C++, but no reason why not to support other user programming languages, provided bindings can be made available.
I am forced to use Qt from Python, and whatever the shortcomings of that language there is no reason why C++ should be suitable for "building realistic GUI" but not Python.
-
I would say that due to python being a default install in many *nix based platforms is one reason. If Qt is available then it is pretty simple to put together dialogs and scripts for doing common tasks. Python is the glue language. The major alternative for guis in Python wxpython. I have used both and Qt is a much richer system for guis.