DOI: https://doi.org/10.15802/stp2019/195581

ANALYSIS OF MECHANISMS AND EFFICIENCY OF SPECIALIZED LANGUAGES OF FUNCTIONAL PROGRAMMING

I. M. Storchak, O. P. Ivanov

Abstract


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.


Keywords


functional programming; Halstead metrics; language capabilities; language comparison; specialized functional languages; Erlang Haskel Lisp; F #; Scala

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


GOST Style Citations


  1. Душкин, Р. В. Практика работы на языке Haskell / Р. В. Душкин // Москва : ДМК Пресс, 2016. – 286 с.
  2. Одерски, М. Scala. Профессиональное программирование / М. Одерски, Л. Спун, Б. Веннерс. – Питер, 2016. – 688 с.
  3. Питер, С. Практическое использование Common Lisp / С. Питер. – Москва : ДМК Пресс, 2017. – 488 с.
  4. Рассел, С. Искусственный интеллект. Современный подход. 2-е изд. / С. Рассел, П. Норвиг. – Москва : Вильямс, 2007. – 1410 с.
  5. Смит, К. Программирование на F# / К. Смит. – Москва : Символ–Плюс, 2011. – 448 с.
  6. Чезарини, Ф. Программирование в Erlang / Ф. Чезарини, С. Томпсон. – Москва : ДМК Пресс, 2015. – 488 с.
  7. Dalorzo, E. Functional Programming with Java 8 Functions [Електронний ресурс] / E. Dalorzo. – Режим доступу: https://dzone.com/articles/functional-programming-java-8 – Назва з екрана. – Перевірено : 25.11.2019
  8. GitHub [Електронний ресурс]. – Режим доступу: https://github.com – Назва з екрана. – Перевірено : 25.11.2019.
  9. Halstead, Maurice H. Elements of Software Science / Maurice H., Halstead. – New York : North Holland, 1977. – 127 р.
  10. Hunt, J. A Beginner’s Guide to Scala, Object Orientation and Functional Programming / J. Hunt. – Springer International Publishing, 2018. – 531 р. doi: 10.1007/978-3-319-75771-1
  11. Michaelson, G. An introduction to functional programming through lambda calculus / G. Michaelson. – Dover Publications, 2011. – 336 р.
  12. Peyrott, S. Introduction to Immutable.js and Functional Programming Concepts [Електронний ресурс] / S. Peyrott. – Режим доступу: https://auth0.com/blog/intro-to-immutable-js/ – Назва з екрана. – Перевірено : 25.11.2019.
  13. Synthesizing functional reactive programs / B. Finkbeiner, F. Klein, R. Piskac, M. Santolucito // Haskell 2019 : Proceedings of the 12th ACM SIGPLAN International Symposium on Haskell. – 2019. – Р. 162–175. doi: 10.1145/3331545.3342601
  14. Wang, M. Trends in Functional Programming / M. Wang, S. Owens // 18th International Symposium. – Springer, 2017. – 149 p. doi: 10.1007/978-3-319-89719-6




Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

 

ISSN 2307–3489 (Print)
ІSSN 2307–6666 (Online)