The Impact of Language Syntax on the Complexity of Programs: A Case Study of Java and Python


  • Kashif Munawar Department of Computer Science & Information Technology, University of Balochistan, Quetta, Pakistan.
  • Muhammad Shumail Naveed Department of Computer Science & Information Technology, University of Balochistan, Quetta, Pakistan.


Cyclomatic Complexity, Programming Languages, Syntax, Java, Python.


Programming is the cornerstone of computer science, yet it is difficult to learn and program. The syntax of a programming language is particularly challenging to comprehend, which makes learning arduous and affects the program's testability. There is currently no literature that definitively gives quantitative evidence about the effect of programming language complex syntax. The main purpose of this article was to examine the effects of programming syntax on the complexity of their source programs. During the study, 298 algorithms were selected and their implementations in Java and Python were analyzed with the cyclomatic complexity matrix. The results of the study show that Python's syntax is less complex than Java's, and thus coding in Python is more comprehensive and less difficult than Java coding. The Mann-Whitney U test was performed on the results of a statistical analysis that showed a significant difference between Java and Python, indicating that the syntax of a programming language has a major impact on program complexity. The novelty of this article lies in the formulation of new knowledge and study patterns that can be used primarily to compare and analyze other programming languages.


S. Gill, “Impacts of Computers on Today ’ s Society,” vol. 2, no. 1, pp. 173–178, 2015.

M. F. Aqda, F. Hamidi, and M. Rahimi, “The comparative effect of computer-aided instruction and traditional teaching on student’s creativity in math classes,” Procedia Comput. Sci., vol. 3, pp. 266–270, Jan. 2011, doi: 10.1016/J.PROCS.2010.12.045.

D. Wilfling, A. Hinz, and J. Steinhäuser, “Big data analysis techniques to address polypharmacy in patients - A scoping review,” BMC Fam. Pract., vol. 21, no. 1, pp. 1–7, Sep. 2020, doi: 10.1186/S12875-020-01247-1/TABLES/3.

A. K. Bansal, “Introduction to Programming Languages,” Introd. to Program. Lang., Dec. 2013, doi: 10.1201/B16258.

B. Teufel, “Organization of Programming Languages,” Organ. Program. Lang., 1991, doi: 10.1007/978-3-7091-9186-6.

B. W. Kernighan and D. M. Ritchie, The C programming language, Second edition. Englewood Cliffs N.J.: Prentice Hall, 1988.

W.-H. Steeb and F. Solms, “Applications in Administration,” C++ Program. with Appl. Adm. Financ. Stat., pp. 375–452, Feb. 2000, doi: 10.1142/9789812813343_0011.

K. Sierra and B. Bates, “Head first Java,” p. 688, 2005.

D. S. McFarland, “JavaScript & jQuery: The Missing Manual,” O’Reilly, p. 538, 2011.

J. Mueller and L. Massaron, “Python for data science for dummies.”

“An Introduction to Programming Paradigms - GC Digital Fellows.” (accessed Jul. 01, 2022).

A. H. Watson, D. R. Wallace, T. J. McCabe, and National Institute of Standards and Technology (U.S.), “Structured testing : a testing methodology using the cyclomatic complexity metric,” p. 113, Accessed: Jul. 01, 2022. [Online]. Available:

M. Lopez, “An Analysis of the Mc Cabe Cyclomatic Complexity Number.”

“Practical Software Testing,” Pract. Softw. Test., 2003, doi: 10.1007/B97392.

M. D. S. Nesc et al., “Cyclomatic Complexity and Basis Path Testing Study,” no. December 2020.

F. Murtadho, D. W. Sudiharto, C. W. Wijiutomo, and E. Ariyanto, “Design and Implementation of Smart Advertisement Display Board Prototype,” Proc. - 2019 Int. Semin. Appl. Technol. Inf. Commun. Ind. 4.0 Retrosp. Prospect. Challenges, iSemantic 2019, pp. 246–250, Sep. 2019, doi: 10.1109/ISEMANTIC.2019.8884289.

P. Gsellmann, M. Melik-Merkumians, and G. Schitter, “Comparison of Code Measures of IEC 61131-3 and 61499 Standards for Typical Automation Applications,” IEEE Int. Conf. Emerg. Technol. Fact. Autom. ETFA, vol. 2018-September, pp. 1047–1050, Oct. 2018, doi: 10.1109/ETFA.2018.8502464.

D. F. Evans, Benjamin J., “Java in a Nutshell, Seventh Edition,” 2018, Accessed: Jul. 02, 2022. [Online]. Available:

“8 Best Popular Projects on Java. Today, according to reliable publicly… | by Andrew Suschevich | Javarevisited | Medium.” (accessed Jul. 02, 2022).

and J. Z. B. d. Böck, A. Grooff, A. Dhiratara, Final_Chapter.html. 2018.

“See top programming languages big companies prefer.” (accessed Jul. 02, 2022).

“12 Top Python App Examples from Top-notch Companies.” (accessed Jul. 02, 2022).

B. M. O. . S. K. A., “A Comparative Analysis of Complexity of C++ and Python Programming Languages Using Multi-Paradigm Complexity Metric (MCM),” Int. J. Sci. Res., vol. 8, no. 1, pp. 1832–1837, 2019, [Online]. Available:

A. A. Khan,et al., “Comparison of Software Complexity Metrics,” Int. J. Comput. Netw. Technol., vol. 4, no. 1, pp. 19–26, 2016, doi: 10.12785/ijcnt/040103.

B. Muriana and O. Paul Onuh, “Comparison of Software Complexity of Search Algorithm Using Code Based Complexity Metrics,” Int. J. Eng. Appl. Sci. Technol., vol. 6, no. 5, pp. 24–29, 2021, doi: 10.33564/ijeast.2021.v06i05.003.

P. Costanza, C. Herzeel, and W. Verachtert, “Comparing Ease of Programming in C++, Go, and Java for Implementing aNext-Generation Sequencing Tool,” Evol. Bioinform. Online, vol. 15, Aug. 2019, doi: 10.1177/1176934319869015.

P. Emmerich et al., “The Case for Writing Network Drivers in High-Level Programming Languages,” 2019 ACM/IEEE Symp. Archit. Netw. Commun. Syst. ANCS 2019, Sep. 2019, doi: 10.48550/arxiv.1909.06344.

C. Chen, “An Empirical Investigation of Correlation between Code Complexity and Bugs,” Dec. 2019, doi: 10.48550/arxiv.1912.01142.

N. Qamar and A. A. Malik, “Impact of Design Patterns on Software Complexity and Size,” Mehran Univ. Res. J. Eng. Technol., vol. 39, no. 2, pp. 342–352, Apr. 2020, doi: 10.22581/MUET1982.2002.10.

E. McDaid and S. McDaid, “Quantifying the Impact on Software Complexity of Composable Inductive Programming using Zoea,” arXiv, pp. 1–8, 2020.

K. C. Louden and K. A. Lambert, Programming languages : principles and practice, 3rd ed. Boston MA: Course Technology/Cengage Learning, 2012.

R. Zakaria, Big Data and Machine Learning: How Using KNN Algorithms Can Help to Predict Employee Attendance. 2020.




How to Cite

Munawar, K., & Muhammad Shumail Naveed. (2022). The Impact of Language Syntax on the Complexity of Programs: A Case Study of Java and Python. International Journal of Innovations in Science & Technology, 4(3), 683–695. Retrieved from