Skip to content

Commit 87183b3

Browse files
committed
added references about python's current status
1 parent 109c770 commit 87183b3

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

bookbase

text/main/basics/variables/typesAndTypeHints/typesAndTypeHints.tex

+12-1
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,21 @@
201201
Using \pglspl{typeHint} together with type checking would have prevented the problems in \cref{lst:variables:types_wrong} from the start.
202202
Either, its author would have discovered the mistake of computing a \pythonil{float} value instead of an \pythonil{int}.
203203
Or they would have more clearly communicated their intention by marking the variable to either hold an \pythonil{int} or a \pythonil{float}.
204-
And this comes at no cost at all when executing the program, because \pglspl{typeHint} are only checked by programmers and tools, but not by the interpreter.
204+
And this comes at no cost at all when executing the program, because \pglspl{typeHint} are only checked by programmers and tools, but not by the interpreter.%
205205
%
206206
\bestPractice{typeHints}{Always use \pglspl{typeHint}.}%
207207
%
208+
There are good reasons for always using \pglspl{typeHint}.
209+
While not specifying variable types is very convenient, it comes at a high cost:%
210+
%
211+
\quotation{J2025TIFJ2JHPITPLOTY2}{\python's only serious drawbacks are (and thus leaving room for competition) its lack of performance and \emph{that most errors occur run-time}.}%
212+
%
213+
Type-related errors are one category of mistakes that will become visible only at runtime.
214+
At the same time, these are errors that can relatively easily be discovered during code analysis.
215+
They are \emph{much} easier to detect than logical flaws in the program code.
216+
Compilers in \pgls{C} or \pgls{Java} would never permit assignments of mismatched datatypes.
217+
With \pglspl{typeHint} and static type checkers like \mypy, we can bring this functionality to \python.%
218+
%
208219
\gitPython{\programmingWithPythonCodeRepo}{variables/variable_types_hints.py}{--args format}{variables:types_hints}{%
209220
A variant of \cref{lst:variables:types} which has been improved by adding type annotations.}%
210221
%

text/main/introduction/whyPython/whyPython.tex

+12-3
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,25 @@
1414
First, \python\ is one of the most successful and widely used programming languages~\cite{CBST2024LOHPPTDDSAMLA}.
1515
We plot the number of pushes to \github\ over time for the most popular programming and web development languages in \cref{fig:languagesByGithubPushes}.
1616
We find that \python\ became the leading languages at some point in~2018.
17-
\python\ is intensely used~\cite{CBST2024LOHPPTDDSAMLA} in the fields of \pgls{AI}~\cite{RN2022AIAMA}, \pgls{ML}~\cite{SSBD2014UMLFTTA}, and \pgls{DS}~\cite{G2019DSFSFPWP} as well as optimization, which are among the most important areas of future technology.
17+
In the TIOBE index, which counts the number of hits when searching for a programming language using major search engines, \python\ ranked one in January 2025 and was named the programming language of the year for~2024~\cite{J2025TIFJ2JHPITPLOTY2}.%
18+
%
19+
\quotation{J2025TIFJ2JHPITPLOTY2}{\python\ is everywhere nowadays, and it is the undisputed default language of choice in many fields.}%
20+
%
1821
If you will do programming in any future employment or research position, chances are that \python\ knowledge will be useful.
22+
According to the 2024 annual Stack Overflow survey~\cite{Y2025DWMMMT2RFSOADS}, \python\ was the second most popular programming language, after \pgls{javascript} and HTML/CSS.
23+
In \github's Octoverse Report from October~2024~\cite{GS2024OALPTTLATNOGDS}, \python\ is named the most popular programming language, ranking right before \pgls{javascript}.
24+
25+
Second, \python\ is intensely used~\cite{CBST2024LOHPPTDDSAMLA} in the fields of \pgls{AI}~\cite{RN2022AIAMA}, \pgls{ML}~\cite{SSBD2014UMLFTTA}, and \pgls{DS}~\cite{G2019DSFSFPWP} as well as optimization, which are among the most important areas of future technology.
26+
Indeed, the aforementioned Octoverse report~\cite{GS2024OALPTTLATNOGDS} states that the use in soft computing is one of the drivers of \python's popularity.
1927

20-
Second, there exists a very large set of powerful libraries supporting both research and application development in these fields, including \numpy~\cite{HMvdWGVCWTBSKPHvKBHFdRWPGMSRWAGO2020APWN,DBvR2024ITN,J2018NPSCADSAWNSAM}, \pandas~\cite{B2012DPWP,L2024PW}, \scikitlearn~\cite{PVGMTGBPWDVPCBPD2011SMLIP,RLM2022MLWPAS}, \scipy~\cite{VGOHRCBPWBvdWBWMMNJKLCPFMVLPCHQHARPvMS2020SFAFSCIP,J2018NPSCADSAWNSAM}, \tensorflow~\cite{ABCCDDDGIIKLMMMSTVWWYZ2016TASFLSML,L2023TDDBTADMLMWT}, \pytorch~\cite{PGMLBCKLGADKYDRTCSFBC2019PAISHPDLL,RLM2022MLWPAS}, \matplotlib~\cite{H2007MA2GE,P2021HOMLPAVWP,J2018NPSCADSAWNSAM}, \simpy~\cite{Z2024DESIEWS}, and \moptipy~\cite{WW2023RSDEWASSAA}\footnote{Yes, I list \moptipy\ here, next to very well-known and widely-used frameworks, because I am its developer.}, just to name a few.
28+
Third, there exists a very large set of powerful libraries supporting both research and application development in these fields, including \numpy~\cite{HMvdWGVCWTBSKPHvKBHFdRWPGMSRWAGO2020APWN,DBvR2024ITN,J2018NPSCADSAWNSAM}, \pandas~\cite{B2012DPWP,L2024PW}, \scikitlearn~\cite{PVGMTGBPWDVPCBPD2011SMLIP,RLM2022MLWPAS}, \scipy~\cite{VGOHRCBPWBvdWBWMMNJKLCPFMVLPCHQHARPvMS2020SFAFSCIP,J2018NPSCADSAWNSAM}, \tensorflow~\cite{ABCCDDDGIIKLMMMSTVWWYZ2016TASFLSML,L2023TDDBTADMLMWT}, \pytorch~\cite{PGMLBCKLGADKYDRTCSFBC2019PAISHPDLL,RLM2022MLWPAS}, \matplotlib~\cite{H2007MA2GE,P2021HOMLPAVWP,J2018NPSCADSAWNSAM}, \simpy~\cite{Z2024DESIEWS}, and \moptipy~\cite{WW2023RSDEWASSAA}\footnote{Yes, I list \moptipy\ here, next to very well-known and widely-used frameworks, because I am its developer.}, just to name a few.
2129
This means that for many tasks, you can find suitable and efficient \python\ libraries that support your work.
2230

23-
Third, \python\ is very easy to learn~\cite{GPBS2006WCTIPIHSUP,VR1999CPFERPASEFTPOT}.
31+
Fourth and finally, \python\ is very easy to learn~\cite{GPBS2006WCTIPIHSUP,VR1999CPFERPASEFTPOT}.
2432
It has a simple and clean syntax and enforces a readable structure of programs.
2533
Programmers do not need to declare datatypes explicitly\footnote{at least during the first steps of learning}.
2634
\python\ has expressive built-in types likes lists, tuples, and dictionaries.
35+
Thus, \python\ was also named the language most popular for those who want to learn how to code in the aforementioned Stack Overflow survey~\cite{Y2025DWMMMT2RFSOADS}.
2736
%
2837
\begin{figure}%
2938
\centering%

0 commit comments

Comments
 (0)