ANALYSIS OF MECHANISMS AND EFFICIENCY OF SPECIALIZED LANGUAGES OF FUNCTIONAL PROGRAMMING
DOI:
https://doi.org/10.15802/stp2019/195581Keywords:
functional programming, Halstead metrics, language capabilities, language comparison, specialized functional languages, Erlang Haskel Lisp, F #, ScalaAbstract
Purpose. The authors aim to determine the differences between functional programming languages, to identify the capabilities of the most popular languages by comparing and analyzing them. To identify the main features, it is necessary to consider their data structures, as well as the application scope. The authors also aim to analyze and compare examples from various fields of language application using metrics of the program texts complexity. Methodology. The five most popular specialized functional languages are selected: Erlang, Lisp, F #, Scala and Haskel. An overview of the official documentation was conducted to obtain information on the capabilities of each language; their data structures and the application scope were studied. The experimental research base is formed from texts of the existing open source software systems and matched by similar applications and equal volume of text. Comparative analysis of sample programs is performed using Halsted metrics, which are calculated using specially designed software. The analysis of the received quality assessments is done graphically. Findings. Software has been developed to obtain Halsted metrics for program input texts in functional programming languages such as Erlang, Lisp, F # and Scala. The complexity of the Haskel programming language syntax did not allow the use of metrics to evaluate the text, so only a documentation review was performed. Benchmarking shows the differences between languages and outlines their use. The examples of different volumes from such areas of application as system programming tasks, graphing, mathematical calculations, AI systems, web programming, etc. were compared. Originality. The authors first conducted a comparative analysis of specialized languages using text complexity metrics, which made it possible to establish that Lisp has the smallest vocabulary and code length, Scala text has the most structured form, and F # and Erlang are marked with extra verbosity. Practical value. The findings and measurements will help in selecting the most effective functional programming language for solving specific problems, taking into account differences in applications. The developed software allows making measurements for various program texts when developing and maintaining complex software systems.
References
Dushkin, R.V. (2016). Practice works in Haskell. Moscow: DMK Press. (in Russian)
Odersky, M., Spoon, L., & Venners, B. (2011). Programming in Scala. Piter. (in Russian)
Piter, S.(2017). Practical Common Lisp. Moscow: DMK Press. (in Russian)
Russell, S., & Norvig, P. (2007). Artificial intelligence. The modern approach. 2nd Edition. Moscow: Williams. (in Russian)
Smit, K. (2011). Programmirovanie na F#. Moscow: Simvol–Plyus. (in Russian)
Cesarini, F., & Thompson, S. (2015). Programming in Erlang. Moscow: DMK Press. (in Russian)
Dalorzo, E. Functional Programming with Java 8 Functions. Retrieved from https://dzone.com/articles/functional-programming-java-8
GitHub. Retrieved from https://github.com. (in English)
Halstead, Maurice H. (1977). Elements of Software Science. New York: North Holland. (in English)
Hunt, J. (2018). A Beginner’s Guide to Scala, Object Orientation and Functional Programming. Springer International Publishing. doi: 10.1007/978-3-319-75771-1 (in English)
Michaelson, G. (2011). An introduction to functional programming through lambda calculus. Courier Corporation. (in English)
Peyrott, S. (2016). Introduction to Immutable.js and Functional Programming Concepts. Retrieved from https://auth0.com/blog/intro-to-immutable-js/ (in English)
Finkbeiner, B., Klein, F., Piskac, R., & Santolucito, M. (2019). Synthesizing functional reactive programs. Haskell 2019: Proceedings of the 12th ACM SIGPLAN International Symposium on Haskell, 162-175. doi: 10.1145/3331545.3342601 (in English)
Wang, M. & Owens, S. (2017). Trends in Functional Programming. 18th International Symposium, 149. doi: 10.1007/978-3-319-89719-6
Downloads
Published
How to Cite
Issue
Section
License
Copyright and Licensing
This journal provides open access to all of its content.
As such, copyright for articles published in this journal is retained by the authors, under the terms of the Creative Commons Attribution 4.0 International License (CC BY 4.0). The CC BY license permits commercial and non-commercial reuse. Such access is associated with increased readership and increased citation of an author's work. For more information on this approach, see the Public Knowledge Project, the Directory of Open Access Journals, or the Budapest Open Access Initiative.
The CC BY 4.0 license allows users to copy, distribute and adapt the work in any way, provided that they properly point to the author. Therefore, the editorial board of the journal does not prevent from placing published materials in third-party repositories. In order to protect manuscripts from misappropriation by unscrupulous authors, reference should be made to the original version of the work.